Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 47.2Mb
PDF (A4) - 47.2Mb
PDF (RPM) - 42.7Mb
HTML Download (TGZ) - 10.9Mb
HTML Download (Zip) - 10.9Mb
HTML Download (RPM) - 9.4Mb
Man Pages (TGZ) - 229.9Kb
Man Pages (Zip) - 335.5Kb
Info (Gzip) - 4.2Mb
Info (Zip) - 4.2Mb
Excerpts from this Manual

13.7.8.9 SHUTDOWN Statement

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.

Another way to stop the server is to send it a SIGTERM signal, which can be done by root or the account that owns the server process. SIGTERM enables server shutdown to be performed without having to connect to the server. See Section 4.10, “Unix Signal Handling in MySQL”.