how to restart mysql server in mac code example

Example 1: mac restart mysql server

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

Example 2: restart mysql mac command line

# mysql start/stop/restart
# MAC
$ cd /Applications/Ampps/mysql/bin
$ mysql.server restart
#Linux
$ /etc/init.d/mysqld restart
or
$ service mysqld restart
or
$ systemctl restart mysqld

Example 3: restart mysql mac

alias mysqlstart='sudo /usr/local/mysql/support-files/mysql.server start'
alias mysqlstop='sudo /usr/local/mysql/support-files/mysql.server stop'

Tags:

Sql Example