Automatically Start MySQL on Startup in OS X Leopard

Monday, 7. April 2008

In an earlier post I explored how to install MySQL from a package on OS X Leopard, but I left unsolved the problem of how to make MySQL start automatically on system startup. This morning while reading Mac OS X Hints a post titled “10.5: Join 'wheel' group as possible fix for system issues” caught my eye and started me thinking that perhaps it might also be a solution for the MySQL auto-start problem I had been unable to solve.

First I had to find a way to add myself to the wheel group so followed a link from that hint to another hint titled “10.5: Manage users and groups using a GUI tool*. From there I downloaded and installed Apple's Server Admin Tools for 10.5. These tools are not meant to be used with the desktop version of OS X, but the Workgroup Manager tool works and can be used add a user to a group. I followed the steps described and added myself to the wheel group. It took me a couple of minutes to find the wheel group because the Workgroup Manager displays the groups' long names instead of their short names. In the case of the wheel group the long name is System Group.

wheel_group

After adding myself to the wheel group I opened the MySQL prefpane in System Preferences and checked “Automatically Start MySQL Server on Startup”. Then I shut down and restarted my MacBook. When it finished booting I logged in and MySQL was already running. Problem solved!

AutoStartMySQL


*Mac OS X Hints offers the following warning for this hint:

Warning: You should not play around with these settings if you don't know what you're doing. It is possible to break certain parts of the operating system, or to render it unusable.

You should definitely not add users to the wheel group unless you are reasonably confident that you know what you are doing and what the security implications are.

Share 'Automatically Start MySQL on Startup in OS X Leopard' on Delicious Share 'Automatically Start MySQL on Startup in OS X Leopard' on Facebook Share 'Automatically Start MySQL on Startup in OS X Leopard' on Google Buzz Share 'Automatically Start MySQL on Startup in OS X Leopard' on Google Reader Share 'Automatically Start MySQL on Startup in OS X Leopard' on LinkedIn Share 'Automatically Start MySQL on Startup in OS X Leopard' on Email

3 Responses to “Automatically Start MySQL on Startup in OS X Leopard”

  1. Jeremy says:

    Note, in the previous URL you must run dscl as root, so #> sudo dscl localhost