Jump to content


Photo

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


  • Please log in to reply
3 replies to this topic

#1 Nothadoth

Nothadoth
  • Members
  • PipPipPip
  • Advanced Member
  • 119 posts

Posted 29 August 2006 - 02:24 PM

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:

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

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!

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 29 August 2006 - 02:35 PM

There is a very large section in the refman that covers this problem in detail.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 Nothadoth

Nothadoth
  • Members
  • PipPipPip
  • Advanced Member
  • 119 posts

Posted 29 August 2006 - 03:49 PM

I cannot find it. And to be honest i'm new to this, could someone help?

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 29 August 2006 - 04:28 PM

Try http://dev.mysql.com...-to-server.html.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users