I am getting the following error when I try to connect to mysql:
Can\'t connect to local MySQL server through socket \'/var/lib/mysql/mysql.sock\' (2)<
Can\'t connect to local MySQL server through socket \'/var/lib/mysql/mysql.sock\' (2)
Here's what worked for me:
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock service mysqld restart