MySql: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (111)

Tried several ways and finally solved it through the following way

sudo gksu gedit /etc/mysql/my.cnf

#bind-address =


bind-address = localhost

if your MySQL server IP is then entire block should be look like as follows:
bind-address =

and restarted

sudo /etc/init.d/mysql restart
it worked

Rev :

(Visited 335 times, 1 visits today)
Spread the love