Mac下彻底删除MysSQL

Mac下mysql安装完成后,并没有卸载文件,只能自己卸载

首先需要停止mysql的有关进程
然后逐一执行代码,彻底删除mysql

sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
vim /etc/hostconfig  (and removed the line MYSQLCOM=-YES-)
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.*

最后三句必须执行!

你可能感兴趣的:(Mac下彻底删除MysSQL)