Installing MySQL (binaries) on Mac OS X Leopard
There are a couple of possible ways to install MySQL server on Mac OS X Leopard. Which one you take depends on what is available at mysql.com. When a new version of Mac OS come out, in the past it has taken mysql.com many months to come up with packaged binary releases of MySQL server for it. During that period you are forced to build MySQL server from sources – I will detail how to do that in a separate post.
For the purposes of this post, let us assume that binary packages are available. At the time of writing, there are binary packages of MySQL server 5.0 and 5.1 available for Mac OS X. The packages also come in two styles: a tar archive, and a .dmg containing .pkg format packages. The tar version contains a nice readme file called INSTALL-BINARY that details all the steps required to get install MySQL up from scratch (e.g. creating mysql user); This is well worth reading. For this go-around however, I decided to try out the .pkg packages.
I downloaded and mounted mysql-5.0.67-osx10.5-x86_64.dmg and mounted it. It contains:
mysql-5.0.67-osx10.5-x86_64.pkg – the server
MySQLStartupitem.pkg – guess what
MySQL.prefPane – a prefpane to start/stop the server
Double-clicking on each of these will install them. The server package appears to be very well behaved – it installs into /usr/local/mysql-VERSION and them symlinks /usr/local/mysql to it. It execute all the other steps required to get the server up (create users, run mysql_install_db etc). The startup item installs to /Library/StartupItems/MySQLCOM. The preference pane goes where preference panes go
After installing set your mysql root password with:
sudo /usr/local/mysql/bin/mysqladmin password <new-password>
and my personal preference is to then install phpmyadmin and go in and delete all other users before continuing.
