MySQL 8.0 Reference Manual Including MySQL NDB Cluster 8.0

13.7.8.9 SHUTDOWN Syntax

SHUTDOWN

This statement stops the MySQL server. It requires the SHUTDOWN privilege.

SHUTDOWN provides an SQL-level interface to the same functionality available using the mysqladmin shutdown command or the mysql_shutdown() C API function.

The Com_shutdown status variable tracks the number of SHUTDOWN statements. Because status variables are initialized for each server startup and do not persist across restarts, Com_shutdown normally has a value of zero, but can be nonzero if SHUTDOWN statements were executed but failed.