mac mysql没法启动 Waring:The /usr/local/mysql/data directory is not owned by the mysql/_mysql

来源:互联网 时间:2017-07-28

今天突然发现mysql打不开了,昨天还好用呢。
在launchpad - 系统偏好设置 -mysql, 点Start Mysql Server按钮,
出现以下提示: Waring:The /usr/local/mysql/data directory is not owned by the mysql/_mysql user.
想起来了,昨天安装homebrew的时候把/usr/local/ 的用户组改了.
没办法,再改回来吧:

sudo chown -R _mysql:wheel /usr/local/mysql/data

然后

ls -l /usr/local/mysql

看看data的用户组是否成功改为 _mysql:wheel 了
再启动mysql

相关阅读:
Top