mysql error on linux

Posted by Shay 
mysql error on linux
January 02, 2011 10:12PM
getting the following error on linux server, the error is:


Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

the line it has pointed out to on page is line where i gave MySQL paramaters ... any help would be appreciated.
Re: mysql error on linux
January 04, 2011 01:40PM
when you use localhost in MySQL parameters list you are automatically connected through the socket file, so an easier way to connect through TCP/IP (ie avoiding socket file) is to connect to the local MySQL server through 127.0.0.1
OR
find out what socket file MySQL server is using (ask your sysadmin or hosting company) and connect using that socket file if you have to connect through the socket file (ie. in cases when MySQL server is running with skip-networking enables). I have also seen people solving this problem by creating symlinks to the actual socket file and using the symlink instead.
Sorry, only registered users may post in this forum.