If you’re a developer, you’ve probably heard of MySQL, and may even need to use it on a daily basis for your work. However, if you own a Mac, and tried to install MySQL on OS X El Capitan or Mac OS X Yosemite, you’ve probably noticed that you receive an Installation Failed message during the process.

Believe it or not, this error isn’t as bad as it sounds, and can easily be avoided. You can either choose to not install the startup item included in the MySQL bundle, or you can actually just ignore the installation error, and start MySQL yourself, whenever you need it.

Even though a preference panel gets installed in System Preferences when you install MySQL, that you can use to start and stop MySQL, this isn’t the preferred method. Most users, actually prefer using Terminal, as the command line is used anyway by developers, and also gives the task the possibility of being automated, as well. In order to learn how to stop and start MySQL on your Mac using the Terminal application, follow the instructions below.

Start and Stop MySQL on Mac Using Terminal

The commands to start and stop MySQL in Mac OS X, OS X El Capitan, and OS X Yosemite, are quite basic and can be carried out in a matter of moments. Please be sure to enter each command onto a single line. Please note that the sudo command will require an administrator password in order to be entered. The commands to start and stop MySQL are as follows,

Start MySQL:

sudo /usr/local/mysql/support-files/mysql.server start

Stop MySQL:

sudo /usr/local/mysql/support-files/mysql.server stop

That’s all you need to know. You’ll notice that the two commands are nearly identical, with the exception of the last word. Although this is an easy to carry out solution, the hope is that future versions of the MySQL installer will solve this problem for OS X. Nonetheless, until this happens, you can, as stated above, either customize the installer and avoid the startup item, or simply ignore the error message, and start and stop MySQL all by yourself, by using the simple commands above.

Start and Stop MySQL Using Preference Panel

If you prefer not to use command line, you can use the preference panel in order to start and stop MySQL. In order to get started, follow the instructions below.

1. Click on the Apple logo in the upper left corner of you screen.

2. Click on System Preferences.

3. Click on the MySQL panel.

4. Click on Start MySQL Server button in order to start MySQL Server on your Mac. The button will then change to Stop MySQL Server.

5. Feel free to click on the Stop MySQL Server if you wish to stop or restart the process.

Whether you use the command line, or the preference panel, you’ll accomplish the task. Please note that if you use the Preference panel, you should uncheck the auto-start option, as this will fail anyway.