MySql server startup error 'The server quit without updating PID file '

Chinmay picture Chinmay · Feb 10, 2011 · Viewed 603.1k times · Source

On Snow Leopard, starting MySQL gives the following error:

The server quit without updating PID 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

Answer

Tombart picture Tombart · Nov 15, 2011

try to find your log file with suffix ".err", there should be more info. It might be in:

/usr/local/var/mysql/your_computer_name.local.err

It's probably problem with permissions

  1. 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 username on output of previous command

  2. check ownership of /usr/local/var/mysql/

    ls -laF /usr/local/var/mysql/

    if it is owner by root you should change it mysql or your_user

    sudo chown -R mysql /usr/local/var/mysql/