From stackoverflow...
I've done this and it works. Pasted instructions below...
First, create a new file: /Library/LaunchDaemons/com.mysql.mysql.plist
<!--?xml version="1.0" encoding="UTF-8"?-->
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true />
<key>Label</key>
<string>com.mysql.mysqld</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/mysql/bin/mysqld_safe</string>
<string>--user=mysql</string>
</array>
</dict>
</plist>
Then update permissions and add it to launchctl:
sudo chown root:wheel /Library/LaunchDaemons/com.mysql.mysql.plist
sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysql.plist
sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist
The reason you need this is because the StartupItems have been removed from Yosemite. There is a note at the start of the page in Apple's docs explaining this: Startup items are a deprecated technology. Launching of daemons through this process may be removed or eliminated in a future release of OS X.
launchd
was introduced, is troubling to say the least.