As it has been for while, OS X no longer includes MySQL. In this article we take a quick look at how to install MySQL and then how to run the Secure Installation to change the default root password.
Download the latest version of MySQL available from the official web site. At time of writing this was 5.7.9 and the description didn’t say it was for 10.11 – but it works fine. Choose the DMG package for easiest installation. You don’t have to sign up to the web site, just click “No thanks, just start my download” beneath the sign up box.
Once downloaded, run the installer. At the end of the installer you will be presented with a dialog of the automatically created root password. Take a note of this.
Open up System Preferences, and select the new MySQL icon.
MySQL is installed in to:
Open up a Terminal window and change to the MySQL folder:
Run the MySQL Secure Installation and enter the password you were given earlier (please note, that it may first prompt you for your system password):
It will warn you that the root password has expired. This is your opportunity to set your own. Enter it twice.
Follow through the remaining questions answering yes or no, depending on your environment. You can then manage your MySQL databases in your preferred method. I like to use Sequel Pro.