ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.
Hello all,I am having problem in connecting mysql database :
When I typed mysql -u root at shell prompt: I got the error..
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I ahve checked for file mysql.sock in mysql directory ..it isn't there..
I have changed permissions of folder mysql to 777..
changed owner and grp of all files under mysql folder to mysql...
I even tried mysqld_safe but didn't work at all...
Below I am pasting my /etc/my.cnf file for checking...
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
[mysql.server]
user=mysql
basedir=/var/lib
[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Can anybody help me out?