MySQL 8 Cookbook
上QQ阅读APP看书,第一时间看更新

Stopping the MySQL 8.0 server

Stopping MySQL and checking the status are similar to starting it, except for the change of one word:

  1. Using service:
shell> sudo service mysqld stop
Redirecting to /bin/systemctl stop mysqld.service
  1. Using init.d:
shell> sudo /etc/init.d/mysql stop
[ ok ] Stopping mysql (via systemctl): mysql.service.
  1. If your installation includes the systemd support (refer to the Managing MySQL Server with systemd section):
shell> sudo systemctl stop mysqld
  1. Using mysqladmin:
shell> mysqladmin -u root -p shutdown