Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you stop MySQL on a Mac OS install?

Tags:

mysql

macos

People also ask

How do I stop MySQL from running on my Mac?

Just go to task manager. Then in process, search mysqld. right click on mysqld then click on stop. with this process you can stop it without using commands.


There are different cases depending on whether you installed MySQL with the official binary installer, using MacPorts, or using Homebrew:

Homebrew

brew services start mysql
brew services stop mysql
brew services restart mysql

MacPorts

sudo port load mysql57-server
sudo port unload mysql57-server

Note: this is persistent after a reboot.

Binary installer

sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart

For those who used homebrew to install MySQL use the following commands below to start, stop, or restart MySQL

Brew start

/usr/local/bin/mysql.server start

Brew restart

/usr/local/bin/mysql.server restart

Brew stop

/usr/local/bin/mysql.server stop

You can always use command "mysqladmin shutdown"


If you are using homebrew you can use

brew services restart mysql
brew services start mysql
brew services stop mysql

for a list of available services

brew services list

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


sudo /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper stop

You can also use start and restart here. I found this by looking at the contents of /Library/LaunchDaemons/org.macports.mysql.plist.