Installing MySQL 5.5.8 on Mac OS X Snow Leopard

Installing MySQL should be a no brainer on any operating system, especially with how mature of a product it is.  Apparently that assumption is incorrect.  I tried installing the most recent GA release of MySQL on my new Snow Leopard machine, and found I couldn’t start the blasted server.  I’ve become lazy the older I get – I don’t want to screw around with shell scripts, hacking this tweaking that.  If I’m provided a Mac-based installer I WANT IT TO WORK.  So, if you’re like me and are frustrated as all hell with not being able to get MySQL to start via System Preferences after installing the 64-bit version (maybe 32-bit as well), do the following:

  1. Drop into Terminal.app
  2. Type: sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /usr/local/mysql/support-files/mysql.server
  3. Find the line starting with basedir and datadir and replace with:
    basedir=/usr/local/mysql
    datadir=/usr/local/mysql/data
  4. Save the file
  5. Start MySQL using the System Preferences pane button.

I’m amazed this is the fix and that the MySQL team overlooked the configuration change in their packaging.  Very irritating.  Enjoy.