MySQL startup script on Mac OS X Snow Leopard

I’ve had problems starting up MySQL database server on startup on Snow Leopard.  MySQL preference pane seems to be flaky and it often fails to start MySQL server.

I created this startup script myself and it seems to work nicely.

sudo nano /System/Library/LaunchDaemons/org.mysql.mysqld.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Now make sure file permission is correct and load the daemon.

sudo chown root:wheel /System/Library/LaunchDaemons/org.mysql.mysqld.plist
sudo launchctl load /System/Library/LaunchDaemons/org.mysql.mysqld.plist
sudo launchctl start org.mysql.mysqld

Restart your Mac and your MySQL server should be running.


  • Arnau

    I have been starting the server with the pref-pane for months as the checkbox of startup at boot didn’t work. Other solutions on the Web didn’t work but yours did, straight away.

    Thank you, man =)

    • You’re welcome. Glad it worked for you too 🙂

  • Bart

    Love ya! Thnx 🙂

  • Group hug 🙂