hyperswitching

Brew is awesome. MySQL is less awesome, but it’s still good. Unfortunately, brew currently lets mysql listen to any interface. If you have no or a weak root password AND you have no firewall, you’re screwed. Fortunately, there’s a way to fix this:

Edit your ~/Library/LaunchAgents/com.mysql.mysqld.plist

And change:

Program/usr/local/Cellar/mysql/5.5.10/bin/mysqld_safe --bind-address=127.0.0.1

into:

ProgramArguments/usr/local/Cellar/mysql/5.5.10/bin/mysqld_safe--bind-address=127.0.0.1

After that, unload and load the plist:

launchctl unload ~/Library/LaunchAgents/com.mysql.mysqld.plist
launchctl load ~/Library/LaunchAgents/com.mysql.mysqld.plist

This tells the mysqld to listen only on 127.0.0.1, which should be enough for devboxes.

  1. hyperswitching posted this
Blog comments powered by Disqus