How To Uninstall MySQL From Mac OS X

Uninstalling a MySQL database server from a Mac OS X computer can be done manually or with the command line. It’s always advised to make backups of your databases prior to making big changes, and perhaps copying your MySQL Config file, if it’s been modified. You will need to login with a “sudo” command, or at least when you issue the first sudo command request. You do not need to place “sudo” before every line, only the first line.

rm /usr/local/mysql
rm -rf /usr/local/mysql*
rm -rf /Library/StartupItems/MySQLCOM
rm -rf /Library/PreferencePanes/MySQL*
rm -rf ~/Library/PreferencePanes/MySQL*
rm -rf /Library/Receipts/mysql*
rm -rf /Library/Receipts/MySQL*
rm -rf /var/db/receipts/com.mysql.*