通过控制面板无法启动、关闭
只能命令行
#启动
sudo /usr/local/mysql/support-files/mysql.server start
#关闭
sudo /usr/local/mysql/support-files/mysql.server stop
可能的权限问题:
sudo chmod -R u+rw /usr/local/mysql
#或者
sudo chmod -R a+rwx /usr/local/mysql/data
删除mysql
ps aux | grep mysql
sudo kill -9 <pid> # Replace <pid> with the process ID of any running MySQL instances
sudo rm -rf /usr/local/mysql
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.*
Reinstall MySQL:
可能的原因是控制面板->mysql->Configuration,取消Keyring Data File打勾,重启即可。