MySQL ERROR! The server quit without updating PID file

I got this error when starting mysql server on my MacBook Pro. The simple solution is to put a line in ~/.my.cnf file under [mysqld] block

ps: I created a symlink under /usr/local/var, which I believe is the default directory by Homebrew, pointing to an external drive, this may be the cause for the above error, but I still need verification.

Inspired by: https://lalitvc.wordpress.com/2016/12/15/mysql-unable-to-setup-unix-socket-lock-file/

But still there is an error:

so use http connection by specifying the address with -h option:  mysql -h '127.0.0.1' -u root -p, or create a symlink to the aforementioned sock file:  ln -s /usr/local/var/mysql/mysql.sock /tmp/mysql.sock

Hope this helps some others!!!

Leave a Reply

Your email address will not be published. Required fields are marked *