Monthly Archives: July 2015

Setting MySQL to Load on Startup (Mac OS X 10.10)

It used to be that you could easily set up MySQL to load at startup using a MySQL plugin on system preferences. Unfortunately, Apple killed support for this in recent versions of OS X. So, you must set this up using a more Unix-like setting with launch daemon (launchd).

Here are the instructions for setting that up.

First, create a plist file at the following location. I’m using the vi editor because it’s easy.

sudo vi /Library/LaunchDaemons/com.mysql.mysqld.plist

Then fill it with the following XML.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Then an adjust the permission:

sudo chown root /Library/LaunchDaemons/com.mysql.mysqld.plist
sudo chgrp wheel /Library/LaunchDaemons/com.mysql.mysqld.plist
sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysqld.plist