Cannot find mysql.sock

Tony picture Tony · Apr 14, 2009 · Viewed 124k times · Source

I just had to re-install mysql and I am having a problem starting it up. It cannot find the socket (mysql.sock). The problem is that neither can I. In my Mac OS X 10.4 terminal, I type: locate mysql.sock, and I get back /private/tmp/mysql.sock. It makes sense that the socket file exist in that location, but it actually does not.

  1. How can I find the socket file?

  2. If locate is returning a false location, it must have some sort of memory and probably indexes. How can I refresh that index?

Answer

behas picture behas · Dec 17, 2010

to answer the first part of your question:

run

% mysqladmin -p -u <user-name> variables

and check the 'socket' variable