Kurinchi Blogger Scribbles …


Archive for February 5th, 2010

Feb 05
2010

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

Last updated: February 5th, 2010

Reason why this error might occur:

i) Incomplete MySQL implementation
ii) MySQL setting mis-configuration

Solution:

root@myserver:/# vi /etc/mysql/my.cnf

Comment out the below line in my.cnf file to make MySQL listen on ALL interfaces
#bind-address = 127.0.0.1

root@myserver:/# netstat -tap | grep mysql
tcp 0 0 *:mysql *:* LISTEN 17785/mysqld

Note that above line which indicates MySQL listening on all interfaces.


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict