• Photography
  • About
  • Blog

Eric Danley

  • Photography
  • About
  • Blog

Uninstall MySQL on Mac OS X 10.5 Leopard

In an effort to migrate a SMF forum from siteground to my own personal leopard server running on a Mac Mini I managed to install MySQL 5.1 but also completely hose the permissions during the migration process. In the process of creating users for the new MySQL database I lost all access.

However, reinstalling MySQL is not as easy to do as you my think. The following are the standard tactics you might try:

 

  1. Reinstall the package - FAIL
  2. Delete the package receipt, then reinstall the package - FAIL
  3. Delete the database, and start over from scratch - Psuedo Fail

 

The MySQL database install with leopard is split in two different locations, both of which are invisible and require root access.

To remove MySQL from Mac OS X perform the following steps:

Open terminal and enter

cd /usr/local/

You will see 1 or more entries that begin with mysql, in my case I had a file called mysql-5.1.32-osx10.5-x86 Remove this file, remember its owned by root so you will need to use sudo

sudo rm -Rv mysql-5.1.32-osx10.5-x86

Put in your admin password and watch as this part of MySQL database is removed. Next we'll removed the shared part of the database. Type the following:

sudo rm -Rv /usr/shared/mysql

After this is done MySQL is completely gone from your system, now you can go ahead and reinstall!

tags: command line, leopard, leopard server, mac, mysql, unix
categories: Macs
Wednesday 03.11.09
Posted by Eric Danley
 

Powered by Squarespace.