经常重启机器后mysql启动报如下错误:

. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Ben-Macbook-Pro.local.pid)

查看网上,知道是权限问题,所以如下命令修改下权限就OK了:

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