The MySQL Preferences pane that comes with the MySQL download from the MySQL site is broken on Leopard, and has been for quite some time.
It installs and correctly reflects the current status of any running MySQL processes, but the "Start MySQL Server" / "Stop MySQL Server" button doesn't do anything.
Well, today I finally got it working.
I worked it all out by first finding out what the "Start MySQL Server" button was actually executing using DTrace. Now my DTrace skills aren't that brilliant yet, but it was enough to confirm my suspicions. Clicking that button just executed
As I said, my DTrace skills aren't very good yet, but that was enough for me. I turned to my scripting skills. I renamed
mysql.server.orig. I then created a wrapper script that I could use to try and troubleshoot what was going on when I clicked the button.
Well, it didn't take long to work out that the preference pane didn't seem to be executing the script as the privileged user, even after prompting me for my password. Quickly modifying my wrapper script to use sudo to call the actual script solved my problem.
You'll never guess what it had in it: a link to a fixed version of the preferences pane, and sure enough this new version correctly executes the /usr/local/mysql/support-files/mysql.server as the privileged user. Just a pity I didn't find this bug when I was searching the MySQL bug reports earlier.
Just a pity I didn't find this bug when I was searching the MySQL bug reports earlier.