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 \
--with-server-suffix=-standard \
--enable-thread-safe-client \
--enable-local-infile \
--enable-shared \
--with-zlib-dir=bundled \
--with-big-tables \
--with-readline \
--with-plugins=all \
--without-docs
For 32 bits on Leopard:
--with-server-suffix=-standard \
--enable-thread-safe-client \
--enable-local-infile \
--enable-shared \
--with-zlib-dir=bundled \
--with-big-tables \
--with-readline \
--with-plugins=all \
--without-docs
I’m still working on Tiger but my old Tiger based G4 mini has died and I need to revive it again. Sorry
Followed by:
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/*
Clean:
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.



Comments
10:01 am
Hi,
I’ve successfully configured the package on my mac-mini G4 PPC with the following parameters:
CFLAGS=”-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk” \
./configure –prefix=/usr/local/mysql \
–localstatedir=/usr/local/mysql/data \
–libexecdir=/usr/local/mysql/bin \
–libdir=/usr/local/mysql/lib \
–with-server-suffix=-standard \
–enable-thread-safe-client \
–enable-local-infile \
–enable-shared \
–with-zlib-dir=bundled \
–with-big-tables \
–with-readline \
–with-plugins=all \
–without-docs
I hope your mac-mini G4 revive again!
10:06 am
Thank you very much, it’s appreciated!
3:08 pm
I tried upgrading on a 10.5.7 Intel mac mini from MySQL 5.0.75 to 5.1.36. The installation went OK, but when I restarted the new MySQL I got the following error in the mail.log:
Jul 21 17:44:52 mail authdaemond[66]: modules=”authmysql”, daemons=3
Jul 21 17:44:52 mail authdaemond[66]: Installing libauthmysql
Jul 21 17:44:53 mail authdaemond[66]: dlopen(/usr/local/lib/courier-authlib/libauthmysql.so, 9): Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
Jul 21 17:44:53 mail authdaemond[66]: Referenced from: /usr/local/lib/courier-authlib/libauthmysql.so
Jul 21 17:44:53 mail authdaemond[66]: Reason: image not found
There was a “libmysqlclient.16.dylib” in that directory but not a “libmysqlclient.15.dylib”. What do I need to do to get this working?
3:33 pm
Please recompile courier-auth and it will work!
R
3:50 pm
Do you mean recompile the old version that I’m using (0.62.1) or get the latest version? Or does it matter?
3:58 pm
it doesn’t matter which version you use. You could use the opportunity to upgrade.
8:30 pm
Thanks, I just was able to upgrade and it worked.