Installing MySQL on Mac OS X El Capitan 10.11

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.

Screen Shot 2015-10-22 at 14.28.51

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.

Screen Shot 2015-10-22 at 14.33.06

Open up System Preferences, and select the new MySQL icon.

From here you can start and stop the service, and you can set it to start automatically on startup. Go ahead and start the service.Screen Shot 2015-10-22 at 14.36.23

MySQL is installed in to:

/usr/local/mysql/

Open up a Terminal window and change to the MySQL folder:

cd /usr/local/mysql/bin/

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):

sudo ./mysql_secure_installation

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.

All done!

 

Print Friendly, PDF & Email