The error is connect connect to the server through mysql.sock(path is ommited) However, I checked my.cnf file. sock are set to the same for both client and server.

What else to check?

I run the command ps xa |grep mysql and it show that the mysqld is running.

Thanks