Mac OS X下完全卸载MySQL的方法
sudo rm -rf /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
sudo nano /etc/hostconfig (复制前面部分回车,然后删掉这一行: MYSQLCOM=-YES-,control+O回车保存,control+X退出编辑界面)(从 Yosemite 开始,/etc/hostconfig 这个文件已经移除,所以 Yosemite 后的系统可以忽略本行)
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.*