1. 程式人生 > >macOS The server quit without updating PID file (/usr/local/var/mysql/XXX.local.pid)

macOS The server quit without updating PID file (/usr/local/var/mysql/XXX.local.pid)

狀況

➜  ~  sudo /usr/local/Cellar/mysql/5.7.15/support-files/mysql.server restart                   [2:36:54]
 ERROR! MySQL server PID file could not be found!
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/XXX.local.pid).

解決

➜  /usr/local/var/mysql sudo chown -R _mysql /usr/local
/var/mysql ➜ /usr/local/var/mysql sudo /usr/local/Cellar/mysql/5.7.15/support-files/mysql.server restart ERROR! MySQL server PID file could not be found! Starting MySQL . SUCCESS!