I've literally looked all over Stack Overflow, Superuser, I cannot find a solution to my problem that I'm experiencing right now, when I want to start MySQL, it produces this error:
ERROR! The server quit without updating PID file (/usr/local/var/mysql/My-Username.local.pid).
with the sudo mysql.server start
command, however, if I simply use the mysql
command, it will produce:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Which is also another problem I cannot fix, I did touch /tmp/mysql.sock
, nothing.
I've chown
'd the /usr/local/var/mysql
with mysql:mysql
recursively, but that didn't help at all.
I installed MySQL via homebrew on OS X 10.7.3. How can I start up MySQL?
Best Answer
We (myself and Mr. Burning) did some diagnosis in chat, and I will detail what we did find:
The root of his problem was that MySQLd was already running in some capacity. This could have been a previous version of MySQL installed from Homebrew, still running after upgrading the binaries/libraries.
Our resolution was to simply kill all of the running processes. Then, OS X's launchd did it's work and restarted MySQLd, which was definitively running as installed by Homebrew.
That seemed to resolve the issue.