When I am trying to connect to MySQL server on my debian server, it gives an error belwo.
mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
When I type:
ls -l /var/run/ | grep mysqld
drwxr-xr-x 2 mysql root 4096 2012-04-08 16:07 mysqld
Any ideas to fix this please?
Try connecting to the TCP port of the server instead of the UNIX socket. Try supplying -h localhost.