basset Posted February 27, 2010 Share Posted February 27, 2010 Hello, I am have 2 identical programs - 1 mysql database is running on port 3306, this is working no problem. When I install a 2nd mysql database on port 3307, I cant connect to it and get the error posted below. Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2005): Unknown MySQL server host 'localhost:3307' (11004) in C:\Users\admin\Desktop\xampp\htdocs\statsmds\includes\header.inc on line 23 Connect failed: Unknown MySQL server host 'localhost:3307' (11004) This is in the code to connect to the database: // mysql host $sql_host = "localhost:3307"; How do I connect to port 3307, everything is on the local computer. Im sure the fix is easy - Im a newb at this stuff. Thanks, for looking! Quote Link to comment https://forums.phpfreaks.com/topic/193589-connecting-to-port-3307-question/ Share on other sites More sharing options...
trq Posted February 28, 2010 Share Posted February 28, 2010 Why would you need two instances of a mysql server on the same machine? Quote Link to comment https://forums.phpfreaks.com/topic/193589-connecting-to-port-3307-question/#findComment-1019249 Share on other sites More sharing options...
basset Posted February 28, 2010 Author Share Posted February 28, 2010 "Note: If you are going to run multiple IL2 servers edit the above scripts and change the schema name for each server. Each Server should have its own schema." This was from the install instructions - I tried to install into the seprate schema, but had no luck. For better or worse I just loaded another mysql on port 3307 to get the data base loaded. If there is a way to to get the scripts to run on the 3306 mysql server, I would be grateful for the help. Quote Link to comment https://forums.phpfreaks.com/topic/193589-connecting-to-port-3307-question/#findComment-1019270 Share on other sites More sharing options...
trq Posted February 28, 2010 Share Posted February 28, 2010 I tried to install into the seprate schema, but had no luck. Maybe you should give us some details about this. Quote Link to comment https://forums.phpfreaks.com/topic/193589-connecting-to-port-3307-question/#findComment-1019272 Share on other sites More sharing options...
basset Posted February 28, 2010 Author Share Posted February 28, 2010 IIll go through step by step the install process I am going through on the 3306 machine until I get to the error inloading the database. I log into the mysql database useing MySql query browser under root, and the mysql schema and run 'fbdjstats database setup.sql’ Orginal script: CREATE USER fbdadmin IDENTIFIED BY 'fbdadmin'; CREATE USER fbduser IDENTIFIED BY 'fbduser'; GRANT USAGE ON *.* TO fbdadmin; CREATE DATABASE IF NOT EXISTS fbdjstats character set utf8 collate utf8_bin; I make a few changes: CREATE USER mdsfbdadmin IDENTIFIED BY 'mdsfbdadmin'; CREATE USER mdsfbduser IDENTIFIED BY 'mdsfbduser'; GRANT USAGE ON *.* TO mdsfbdadmin; CREATE DATABASE IF NOT EXISTS mdsfbdjstats character set utf8 collate utf8_bin; Thus excutes fine - database is created abd users are created. exit Quote Link to comment https://forums.phpfreaks.com/topic/193589-connecting-to-port-3307-question/#findComment-1019368 Share on other sites More sharing options...
basset Posted February 28, 2010 Author Share Posted February 28, 2010 I open MySql Administrator using root and add the proper privileges to mdsfbdadmin (add everything) and mdsfbduser (only add select and excute) . for the schema mdsfbdjstats. exit Quote Link to comment https://forums.phpfreaks.com/topic/193589-connecting-to-port-3307-question/#findComment-1019369 Share on other sites More sharing options...
basset Posted February 28, 2010 Author Share Posted February 28, 2010 here is the step where I run into a issue: I connect to the database using MySQL Query Browser with the mdsfbdadmin account and the mdsfbdjstats schema. instrustions say to run 2 scripts: Wait - I dont believe this - IT WORKS!! LOL - why this time and not all day yesterday?? I have no idea - but I guess going through this step by step and posting in the forums as I go did it!! I worked on this yesterday for 12 hours before just createing a new database is desperation. THANK YOU THORPE for offering your time and knowledge. Your greatly apprciated!! Quote Link to comment https://forums.phpfreaks.com/topic/193589-connecting-to-port-3307-question/#findComment-1019374 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.