The MySQL manual says
--socket=file_name, -S file_name ... On Unix, the name of the
Unix socket file to use, for connections made using a named pipe
to a local server.
The default Unix socket file name is /tmp/mysql.sock.
which might surprise folks who've had to contend with the error
"Can't connect to local MySQL server through socket '[something-other-than-/tmp/mysql.sock]'".
I'll try to explain here why the name is often something quite different, how to know what the MySQL server is really …[Read more...]