Method: 1. Use service to shut down, the syntax is "service mysql stop"; 2. Use the mysqld script to shut down, the syntax is "/etc/inint.d/mysql stop"; 3. Use "mysqladmin shutdown" The command is closed.
The operating environment of this tutorial: Ubuntu 17.04 system, mysql8.0.22 version, Dell G3 computer.
How to start/stop/restart MySQL
1. Startup method
1. Use service Start:
service mysql start
2. Use the mysqld script to start:
/etc/inint.d/mysql start
3. Use safe_mysqld to start:
safe_mysql&
2. Stop
1. Use service to stop:
service mysql stop
2. Use mysqld script to stop:
/etc/inint.d/mysql stop
3. mysqladmin shutdown
3. Restart
1. Start using service:
service mysql restart
2. Start using mysqld script:
/etc/inint.d/mysql restart
Recommended learning: mysql video tutorial
The above is the detailed content of How to close mysql in ubuntu. For more information, please follow other related articles on the PHP Chinese website!