Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


#1

hi there
i have set up a database and it all seems correct, i have more databases up and they work fine its just this one, and i get this error:

Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

has anyone else had this?

heres the link

http://www.timaru.gen.nz/koolphp/Install/index.php?step=1&err=true

trying to set up “koolphp”

thank you


#2

You probably left the “hostname” field blank. Fill it in with your MySQL hostname (probably mysql.timaru.gen.nz) and try again.


#3

hi there
no its filled in ie:
shop.timaru.gen.nz

very strange?
is there anyway you could have a look

cheers


#4

Are you able to log into your database via DH panel --> Goodies --> MySQL Databases?


#5

hi there

yes of course!!! i logged on to DH panel --> Goodies --> MySQL Databases.

thats were i create the host and upload my databases


#6

I’m having the same problem: i use the DH Web Panel -> Toolbox -> MySQL Databases to make a new database. i can see several entries in the Hostname list. When I go to connect to the new DB, i get :
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

This happens no matter which hostname I use. Btw, this is the error i get when trying to connect using “mysql mysql.mydomain.com” in an SSH session with my DH account.

Anyone find a solution to this?


#7

The error message you’re getting indicates that the MySQL hostname isn’t set correctly. You’re putting the hostname where the name of the database belongs.

Try:


#8

This is my first post here. I had the same problem and have contacted my hosting account. They resolved it. But took about 18 hours to resolve the issue. Hope this helps.