Why can MySQL not connect through socket “tmp/mysql.sock”?

Most likely because your installation of MySQL is configured to write its socket in ”

/var/mysql/mysql.sock

“.

Just tell your client/web application to use ”

/var/mysql/mysql.sock

” and you should be fine.