How to remove installation of MySQL on Mac OS X

Viewed 17448

I need to install older version of mysql server on mac os, but I have a newer version.

I tried to remove this newer installation (5.1), but when start old version install (5.0b) message "MySQL 5.0.51b-community for Mac OS X can't be installed in this disk. A newer version of this software alrady exists on this disk".

I can't recognize problem, because I remove all data of previouse install, but installer says no.

Mac OS version 10.6.

6 Answers

Try this, I had to struggle but this works for me!!!!!!!

  1. sudo rm /usr/local/mysql
  2. sudo rm -rf /usr/local/mysql*
  3. sudo rm -rf /Library/StartupItems/MySQLCOM
  4. sudo rm -rf /Library/PreferencePanes/My*
  5. (Edit /etc/hostconfig) sudo vi /etc/hostconfig (Remove line MYSQLCOM=-YES)
  6. sudo rm -rf /Library/Receipts/mysql*
  7. sudo rm -rf /Library/Receipts/MySQL*
  8. sudo rm -rf /var/db/receipts/com.mysql.*

You can use the built-in utility pkgutil to remove the package receipt:

sudo pkgutil --forget com.mysql.mysql

On Snow Leopard I had to additionally kill mysqld and did

rm /private/var/db/receipts/com.mysql.*

sudo rm -rf /Users//Library/StartupItems/MySQLCOM sudo rm -rf /Users//Library/PreferencePanes/My* sudo rm -rf /Users//Library/Receipts/mysql* sudo rm -rf /Users//Library/Receipts/MySQL*

Related