The mysql.sock file is a socket connection to your mysql server so it can be
accessed remotely. You don't say what operating system the mysql server is
running under. In my upuntu 10 server the mysql.sock file is in /var/run.

The easiest thing to try would be to shut down the mysql server and restart
it. If you don't have a socket file after restarting then there is a deeper
problem as suggested by your other responder.

> Jun 30 at 7:01 PM Hi,
>
>
> I have a MySQL database that was working fine until yesterday. now its
> giving me an error:-
>
>
> Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (2)
>
> there is no file in that directory. Can someone please assist?
>
> Thank you.
>
> Krisna Gokoel