Getting MySQL Preference Pane To Work In Leopard

The most visited post on my blog is the post regarding a fix for getting MySQL to run on Leopard. Today, Charlie Jackson posted a comment to that post with a fix he discovered for getting the preference pane to work so you no longer have to start/stop MySQL via the commandline. So that it wouldnt be buried in the comments, I decided to post it here.

First, open a terminal window and enter the following commands:

cd /usr/local/mysql/support-file

mv mysql.server mysql.server.real


touch mysql.server

Next, you will need to edit the new mysql.server file that we just created with the touch command. I used textmate by simply typing “mate mysql.server”, but you could use vi or whatever you want.
Once you have the file open for editing, simply enter the following code into the file and save it.

sudo /usr/local/mysql/support-files/mysql.server.real $1

Once this was done, I had to change the permissions on the file to get it to work so I ran the following in the terminal:

sudo chown root:wheel mysql.server

sudo chmod +x mysql.server

After that, fire up your system preferences and test the MySQL pane. Mine starts and stops the server perfectly.
Thanks again Charlie!

—– UPDATE! ——

Lars posted in the comments below a link to a patched pref pane that has been FINALLY released! Thanks for pointing this out Lars!
I have installed it on both my 24″ iMac and my MBP and it works great!
Grab it here

58 thoughts on “Getting MySQL Preference Pane To Work In Leopard”

  1. I keep getting a permission denied message when i do the "mv" and "touch" commands. I made sure that mysql was stopped before I attempted the above commands. Any suggestions? This is the LAST little piece to my LAMP stack… so close!

  2. Yup the "sudo" fixed that problem.

    However, its still not working… the mysql pref pane just gives me neverending pin-wheel when I either Start or Stop. I can start through command line, so I guess that will have to do for the time being. Really strange cause I got this whole setup to work flawlessly a few weeks ago on my other mac.

  3. ^^ Exactly the same here. The fix seemed to work at first, but after a restart the prefs pane is just giving me a never-ending pinwheel.

  4. Yes, me too.
    After restart the thing won’t work.

    If I start mysql using Terminal, then the preference panel works fine, but it won’t work if I haven’t manually started mysql.

    Any ideas?

  5. Hmmm… not really sure. Mine is working fine. I would check the permissions and owner of the new file you created to make sure its the same as the old file. Just to make sure its not a permissions issue.

  6. Oh. Er, I’m a bit of a dunce with this ‘under the hood’ stuff…

    These are the permissions for the things in the ‘support-files’ directory:

    -rw-r–r– 1 root wheel 3316 14 Jan 20:07 MySQL-shared-compat.spec
    -rw-r–r– 1 root wheel 3383 12 Jan 01:43 compiler_warnings.supp
    -rw-r–r– 1 root wheel 773 12 Jan 01:43 magic
    -rw-r–r– 1 root wheel 4933 14 Jan 20:07 my-huge.cnf
    -rw-r–r– 1 root wheel 20910 14 Jan 20:07 my-innodb-heavy-4G.cnf
    -rw-r–r– 1 root wheel 4909 14 Jan 20:07 my-large.cnf
    -rw-r–r– 1 root wheel 4916 14 Jan 20:07 my-medium.cnf
    -rw-r–r– 1 root wheel 2486 14 Jan 20:07 my-small.cnf
    -rwxr-xr-x 1 root wheel 41921 14 Jan 20:07 mysql-5.0.51a.spec
    -rwxr-xr-x 1 root wheel 839 14 Jan 20:07 mysql-log-rotate
    -rwxr-xr-x 1 root wheel 68 3 Feb 17:13 mysql.server
    -rwxr-xr-x 1 root wheel 11147 14 Jan 20:08 mysql.server.real
    -rw-r–r– 1 root wheel 41921 14 Jan 20:07 mysql.spec
    -rw-r–r– 1 root wheel 926 14 Jan 20:07 mysqld_multi.server
    -rw-r–r– 1 root wheel 589 14 Jan 20:07 ndb-config-2-node.ini

    So those two files are -rwxr-xr-x. Is this what they should be? (I included the others just in case they had any impact.)

    Otherwise, it’s the same. After restarting the machine if I try and use the preference panel to turn it on, I get the infinite pinwheel and have to force quit system preferences ("not responding").

    If I start safe_mysqld in terminal, it all comes good again.

    Any ideas? (I have just erased and installed Leopard, with minimal extras.)

  7. This doesn’t work for me either. I’m running MySQL 5.0.51a on Mac OS X 10.5.1. The server starts up and works fine when started with "safe_mysqld &", and the preference pane correctly shows whether the server is running or not. But after applying the above fix, I too get the "beachball of death" when I try to start (or stop) the server using the preference pane, and System Preferences must then be force-quit. I just put everything back the way it was; the preference pane doesn’t work, but at least if I click the button, it simply does nothing instead of causing System Preferences to lock up.

  8. Thank you, thank you, thank you!
    It was driving me nuts that I couldn’t use the pref pane to start/stop mysql! I was about to write an automator app to run the command line actions, but I thought that would be unnecessary.
    Now the pref pane works like it should!

  9. I tried changing the mysql user to _mysql, but it didn’t make a difference. Still the hang time.

    I remember reading somewhere in my scourings that yes, the user has changed to have the extra underscore, but that either ‘mysql’ or ‘_mysql’ works (i.e. they’re interchangeable) – unfortunately I can’t remember where I read it …

    Still, once I’ve started mysql using the Terminal, the preference pane comes good and all is rosy – a bit of a pain, but it only takes a few seconds …

  10. Since this post is the #1 hit which comes up on google when you combine search terms "MySQL" "Leopard" (at least that’s what I think I used to get here), I thought you might be interested in the following:

    MySQL finally (FINALLY!) fixed the goddamn pref pane. However, the guy who points us to this – a commenter to <a href="">this post</a> (Alfredo Kojima), also points out that the OTHER problem with many Leopard installs of MySQL not working right (or not working at all) was that the MySQL data directory had incorrect permissions on it. The fix for that is: sudo chown -R mysql:wheel /usr/local/mysql/data

    Hope this helps anyone still having trouble. Worked for me.

  11. Outstanding! FINALLY, I have MySQL 5.0.51-a-osx10.4-i686 running on my MacBook Pro on OS X 10.5.2.

    This plus PHP and Apache put me in business.

    Thanks for this thread and all this information.

  12. thanks for looking into this. I was getting tired of starting and stopping from the command line. I did the original fix to this post then updated to Lars’ fix. both worked great.

  13. For those who are unsettled about these commands and are still not having it work:

    When you change the permissions on the created file in the instructions using:

    sudo chown root:wheel mysql.server

    change "root" to whatever your current admin username is.
    for example
    sudo chown tferguson:wheel mysql.server

  14. Thanks for all the hard work. Anyone know of a good GUI Tool that I can use. MySql is still showing 10.4. Navicat is Leopard compatible but is $79.

    Thanks, Ed

  15. The tip from Lars with the permissions change on /usr/local/mysql/data fixed the problem I was having with the hanging System Preferences. Thanks to all!

  16. Hi,
    first of all thanks to Lars and the Pref-Pane-Fix.
    I found out (thanks to an Italian blog) how to fix the startup issue.
    You have to move MYSQLCOM to /Library/StartupItems/

    type in Terminal:

    sudo mv /usr/local/MySQLCOM /Library/StartupItems/

    Now everytime you shut down or reboot MYSQL will automatically start (if checked in the Pref-Pane)


    tnx to

  17. To edit in these lines into your file….


    sudo /usr/local/mysql/support-files/mysql.server.real $1

    Russ gave this command: mate mysql.server

    It didn’t work for me so i found an alternative command instead of mate I used "pico" I also had to add sudo before each of my commands

    so this is what it looked like: sudo pico mysql.server

  18. Thanks so much for the pref pane fix and for all the other fixes from the other commentors, especially the one about the MySQLCOM in the startup items folder. I wondered where the heck that went when I installed it!

  19. I installed the Mysql Package as you suggested on Leopard v.10.5.4. Mysql icon never appeared in my system prefs. Any thoughts on how to get it there?

    This worked fine for me on Tiger.

  20. Thanks for everyone’s input.

    I tried the above suggestions to get the MySQL Preference Pane fixed, but it was not working.

    So, I decided to install the newest version of the MySQL community server from

    After downloading the 10.5 package, I double clicked on the MySQLStartupItem.pkg and installed it.

    Next, I double clicked on the MySQL.prefPane, and the installed alerted me that I had an old version of the preference pane installed. It then politely asked if I would like to overwrite the old version. I selected “yes”, and it installed the newest version.

    After these steps, the preference pane worked again! No terminal required!

    I DID NOT INSTALL THE NEWEST .pkg VERSION OF MYSQL, just the MySQLStartupItem.pkg and MySQL.prefPane. I was satisfied with my current version of MySQL, so I decided not to go through the process of installing a newer version.

    Hope this helps!

Leave a Reply

Your email address will not be published. Required fields are marked *