I’m very sorry this has taken so long. I wanted to make sure I had a good description of the instructions and tested it with most of the applications in use. I think I’ve got it nailed which means this instructions will give you a safe way to upgrade your MySQL version.
But as always with MySQL, make a backup of your data before you start messing with MySQL. I try to do my best at offering you a safe instruction set but I’m unable to foresee any combination of soft and hardware you might have installed so it might not work. You can use mysqldump, phpMyAdmin or any other tool you might use.
Alright, backup ready! Here we go…
First download the new 5.1.x packages, at the time of writing that would be 5.1.34. Download the appropriate package for your platform from the section called: “Mac OS X (package format)”. Then from the bottom section called “Source downloads” download the “Compressed GNU TAR archive (tar.gz)” package.
When you are ready you need to stop your current installation of MySQL, but because we made it foolproof and unstoppable (it will restart automatically) we need to do some extra steps:
sudo launchctl unload /System/Library/LaunchDaemons/com.diymacserver.mysql.plist
Now the old 5.0.x installation of MySQL is stopped and you have a backup ready and waiting we can continue.
Open/Mount the disk-image of the 5.1.x version you just download and install MySQL from there by double clicking the installer and follow the instructions.
When you are finished continue with unpacking the 5.1.x source archive you downloaded as well. CD into the directory and execute the following commands:
For 64 bits on Leopard:
CXXFLAGS=”-arch x86_64″ \
./configure --prefix=/usr/local/mysql \
For 32 bits on Leopard:
I’m still working on Tiger but my old Tiger based G4 mini has died and I need to revive it again. Sorry
sudo make install
Now to restore all your databases we can do two ways: Quick and dirty or clean. Both will work, but you will need to check your users and passwords afterwords.
Quick and dirty:
Copy the data directory from your 5.0.x installation to the new mysql/data directory.
sudo chown -R _mysql /usr/local/mysql/data/*
Startup MySQL and import your backup.
To startup MySQL you can just re-enable the lauchd commands:
sudo launchctl start com.diymacserver.mysql
All should be fine.