Thursday, 17 April 2008

Installing MySQL on OS X 10.5 Leopard

There are plenty of blog posts out there explaining the intricacies of installing MySQL on Leopard, this post from explorer's club is the best one I have found and I'm not going to create another variant on that particular theme.


However there are two points I'm going to cover that (until I posted comments to the page linked above last night) that remain less than clear and I think they deserve repeating here.


First point: you need to check your Mac's CPU before you download MySQL Server, because if you have (like me) an Intel Mac, you need to check what CPU it has. You can check this by choosing ''about this mac' on the Apple menu:



If you have an Intel Core 2 Duo, download the x86_64 (64 bit) version, and if you have a plain Intel Core Duo, download the x86 (32 bit) version. If you get the "bad CPU type in executable" message on the console, scrub your installation and start again, you've installed the wrong version. Older Intel Macs, notably the Mac Mini, have the 32 bit processor whereas all models on sale today have the 64 bit processor.


Second point: people have problems getting the database to start when the machine is turned on. If you install everything from both the main mysql database package and the MySQLStartupItem.pkg then all you have to do is to copy /user/local/MySQLCOM to /Library/StartupItems:


sudo mkdir /Library/StartupItems/MySQLCOM

sudo cp -R /user/local/MySQLCOM /Library/StartupItems/MySQLCOM


Then (having installed the control panel entry) make sure MySQL is configured to automatically start:




Finally, once you've installed the MySQL GUI pack (MySQL administrator et al) there is a nice desktop gadget tucked away in the MySQL Tools folder that allows you to monitor the status of a MySQL database. I spent an irritating 30 minutes trying to remember which site I downloaded it from before I remembered where it was.

1 comments:

theFerf said...

Thanks for the post! The missing piece I had was the wrong mysql package was installed, and you nailed it perfectly... Im good to go now.

Thanks so much!