Homebrew Installed MySQL Autostart

I really like homebrew (http://github.com/mxcl/homebrew/). It is a much more sensible alternative to MacPorts for package management in OS X. One thing that has been bugging me is that the launchctl for MySQL wasn't working. I followed the instructions from the install when it said to run the launchctl command, but MySQL would never autostart when I booted the machine. I rarely ever reboot so it isn't that big a deal, but still slightly annoying when I do.

Luckily, there is another easy way to launch it automatically. All you need to do is copy

$HOMEBREW_INSTALL/Cellar/mysql/{VERSION_NUMBER}/com.mysql.mysqld.plist

to

~/Library/LaunchAgents

...and you're done! I did it this morning and it is working like a champ. Just keep in mind that it will start mysql when you log in as opposed to when the machine actually starts. Not a big deal for development boxes though.