I\'m getting this error
ERROR 2002 (HY000): Can\'t connect to local MySQL server through socket \'/var/run/mysqld/mysql.sock\' (2)
even though
This problem will occurred due to some unnecessary changes made in my.cnf file. Try to diff /etc/mysql/my.cnf with one of working mysql servers my.cnf file.
/etc/mysql/my.cnf
I just replaced /etc/mysql/my.cnf file with new my.cnf file and this works for me.