How do I install and run MySQL? I installed MySQL:



but MySQL certainly isn't on the path when I open a terminal, nor do I see it in applications, as I seem to recall Windows handles MySQL.
My favourite way to install and run MySQL is via the Homebrew package manager. With Homebrew installed it's as straightforward as:

brew install mysql


This gets you the server and the command line connection tool. It's setup to run with no password, so it's not suitable for production use, but it's perfect for developing with. Homebrew takes care of putting everything you need on your PATH for you, no digging around in .app bundles for binaries.

Once installed, to connect:

mysql -uroot


To have launchd start mysql at login:

ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents


Then you can start it with:

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist


Or if you don't care about having it start on machine boot/restart, you can just run the server directly with:

mysql.server start


The configuration file it reads will be in at /usr/local/etc/my.cnf.

Bonus: having Homebrew on your system puts you one command call away from installing all kinds of other packages. It's a reasonable package manager without a lot of fluff and cruft.