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 stopRedirecting 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

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.