Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)

I have installed MySQL server and trying to connect to it, but getting the error:

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

I have checked my /tmp directory and there is no mysql.sock. I can’t find mysql.sock anywhere. I read that it might be in

    /var/lib/mysql/mysql.sock

But I checked there as well and there is even no mysql directory, only some postfix thing inside /lib. Could anyone help me with this problem?

Leave a Comment