On Mac OS X v10.6 (Snow Leopard), starting MySQL gives the following error:
The server quit without updating PID file
File my.cnf
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 16K
pid-file=/var/run/mysqld/mysqld.pid
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Try to find your log file with suffix “.err”. There should be more information. It might be in:
/usr/local/var/mysql/your_computer_name.local.err
It’s probably a problem with permissions
-
Check if any MySQL instance is running
ps -ef | grep mysql
If yes, you should stop it, or kill the process:
kill -9 PID
where PID
is the number displayed next to the username on the output of the previous command
-
Check ownership of /usr/local/var/mysql/
ls -laF /usr/local/var/mysql/
If it is owner by root
, you should change it to mysql
or your_user
sudo chown -R mysql /usr/local/var/mysql/