在OSX中安装Mysql如果一旦出现错误,很难卸载,需要手动删除部分Mysql运行和配置文件,如下为删除相关文件的shell,可能不存在,但尽量查找并删除,避免出现一些莫名问题。
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.*