ERROR! The server quit without updating PID file (/usr/local/var/mysql/XXX.local.err) - MySQL Issue on OS X

While trying to start your MySQL server on OS x, if you also encountered this weird looking issue this is how to give a crack at it. 

First check whether the file at that location (usr/local/var/mysql/XXX.local.err) has the correct owner. The owner should be your user. Not '_mysql' user. If that is the case, just delete that file with rm command.

If it doesn't solve the problem, then open that file with an editor (nano or vi). You can see the log and scroll down until you see a [ERROR] line. Now, this error could be something to do with permission or some generic access issue like sql port not being available. 


In my case, it was clear from the log that the port 3306 was not available since another mysql process was running in the background. If you see the same, just do a "pkill mysqld" in your terminal which will kill all the running instances of mysql servers.


Start your server (mysql.server start) again. Hopefully, it'll show a SUCCESS :-)


Comments

Popular Posts