Quit MySQL without it restarting on El Capitan

What finally worked for me was stopping MySQL through the Mac System Preferences interface. That killed mysql without it coming back.

enter image description here


If you used homebrew to install mysql, mysqld will keep on restarting unless you use following brew command:

brew services list

brew services list output

Get the name of service to stop and then run the following command:

brew services stop [email protected]

On OS X El Capitan, this worked for me:

sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

On macOS Sierra, this worked for me

Stop MySQL:

launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

Start MySQL:

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