My problem started off with me not being able to log in as root any more on my mysql install. I was attempting to run mysql without passwords turned on... but whenever I
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
in /etc/my.cnf add this lines:
/etc/my.cnf
[client] socket=/var/lib/mysql/mysql.sock <= this path should be also same as is[mysqld]
And restart the service with: service mysql restart
service mysql restart
this worked for me