Restart, Start, Stop MySQL - Command lines under MacOS

Restart, Start, Stop MySQL - Command lines under MacOS
0

#1

It does not take days, but up to hours if you don’t know the right Command lines to Restart, Start, and Stop MySQL under MacOS.

Whatever your MacOS version is, take the following proper command lines to do.

On macOS Sierra & OS to start/stop/restart MySQL post 5.7

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

On OS X to start/stop/restart MySQL pre 5.7 from the command lines:

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