Jump to content

Archived

This topic is now archived and is closed to further replies.

Nothadoth

mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server

Recommended Posts

www.igbltd.co.uk

Can some body help me fix this problem? I'm not sure as to what to do. Here is just one of the errors:

[code]mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /websites/LinuxPackage02/ig/bl/td/igbltd.co.uk/public_html/styles/navigation.php on line 9[/code]

I know that it is something to do with the connection part that says 'localhost' because the usernames, passwords and database tables are all correct. When I searched it up on google I found a website with a connection test script and it's telling me this:

"Your MySQL hostname is incorrect or you do not have the MySQL service started"

I thought it was that localhost was wrong, so I rang up my server (Myserverworld) and asked them and they said that it isn't anything to do with localhost and that I need to connect through MySQL Duo 1 or something.

Can somebody help?

Thank you!

Share this post


Link to post
Share on other sites
There is a very large section in the refman that covers this problem in detail.

Share this post


Link to post
Share on other sites
Try [url=http://dev.mysql.com/doc/mysql/en/can-not-connect-to-server.html]http://dev.mysql.com/doc/mysql/en/can-not-connect-to-server.html[/url].

Share this post


Link to post
Share on other sites

×

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.