Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/193589-connecting-to-port-3307-question/
Share on other sites

"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.

 

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

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!!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.