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)
Just edit /etc/my.cnf Add following lines to my.cnf
/etc/my.cnf
my.cnf
[mysqld] socket=/var/lib/mysql/mysql.sock [client] socket=/var/lib/mysql/mysql.sock
Restart mysql and connect again
mysql -u user -p password database -h host;