Ok, I've searched all over and have spent quite a bit of my time installing, uninstalling, trying various option but without success.
I'm on Mac OS X Lion (10.7.3) and am trying to setup a Python, MySQL.
I successfully installed Python and MySQL via HomeBrew. Python works great.
After MySQL Installation, I followed the first 2 steps - unset and the mysql_install_db
commands.
Now, when I try to start mysql "mysql.server start", I get the following error
ERROR! The server quit without updating PID file (/usr/local/var/mysql/Brajeshwar.local.pid).
Brajeshwar
is my username on my machine.
This worked for me on 10.12.2 :
then
Try this (OSX)
Step 1:
ps -aux | grep mysql
Then kill the 4 digits PID number
Step 2:
kill 1965
Step 3:
mysql.server start
Or having hard time to locate those PID numbers, try this below
Step 1 again:
ps -aux | grep mysql
Step 2 again:
killall
Step 3 again:
mysql.server start
EDIT 2012/09/18: As pointed out by Kane, make sure the
mysql
database is properly set up before doing anything else. See “PID error on mysql.server start?” for more info.Original answer kept for history's sake: It most likely is a permissions issue. Check
/usr/local/var/mysql/*.err
. Mine said:I also had to do this:
I found that it was a permissions issue with the
mysql
folder.solved it for me.
I’ve got a similar problem with MySQL on a Mac (Mac Os X Could not startup MySQL Server. Reason: 255 and also “ERROR! The server quit without updating PID file”). After a long trial and error process, finally in order to restore the file permissions, I’ve just do that:
launch the Disk Utilities.app
choose my drive on the left panel
click on the “Repair disk permissions” button
This did the trick for me. Hoping this can help someone else.
First
mv -f /var/lib/mysql /var/lib/mysql.bak
and try the commandmysql_install_db --user=mysql --ldata=[destination]
replace the destination with the data directory, after that start the MySQL with/etc/init.d/mysql restart