PDA

View Full Version : Connecting to a Mysql database


Crazy-Software
01-02-2008, 07:06 AM
I am setting up my forum again after I just moved over here.

I am trying to connect to Mysql database, but I keep getting a critical error could not connect to database.

I have entered all the information correctly as far as I can tell. It is located within the config file for database information.

I have also created the database, populated it, and added a user to it, but I still cannot connect to it...

Any thoughts or help?

Thank You

redsox9
01-02-2008, 08:49 AM
Are you defining the server as localhost rather than using a host name and port?

mysql_connect('localhost', 'mysql_user', 'mysql_password');

Crazy-Software
01-02-2008, 12:02 PM
I believe I have it corrected, I just made a new database and started over, maybe it's because my transfer of domain has not fully propagated yet...

I could be fishing here, but it seems like a reasonable conclusion...

I will bump this back up if I still have problems.

Thank You

felgall
01-02-2008, 01:29 PM
If you don't want to wait for your domain to propogate then you can add a line to your "hosts" file (assuming you are running Windows) to point your domain directly to the correct IP address so that it can access your hosting directly without needing to do a lookup on a domain name server.