diff --git a/TOC.md b/TOC.md index adf39dc7a46bb..2eb7afa5e0aed 100644 --- a/TOC.md +++ b/TOC.md @@ -287,6 +287,7 @@ + [`SHOW [FULL] TABLES`](/sql-statements/sql-statement-show-tables.md) + [`SHOW [GLOBAL|SESSION] VARIABLES`](/sql-statements/sql-statement-show-variables.md) + [`SHOW WARNINGS`](/sql-statements/sql-statement-show-warnings.md) + + [`SHUTDOWN`](/sql-statements/sql-statement-shutdown.md) + [`SPLIT REGION`](/sql-statements/sql-statement-split-region.md) + [`START TRANSACTION`](/sql-statements/sql-statement-start-transaction.md) + [`TRACE`](/sql-statements/sql-statement-trace.md) diff --git a/sql-statements/sql-statement-shutdown.md b/sql-statements/sql-statement-shutdown.md new file mode 100644 index 0000000000000..e6743b9810aef --- /dev/null +++ b/sql-statements/sql-statement-shutdown.md @@ -0,0 +1,35 @@ +--- +title: SHUTDOWN +summary: An overview of the usage of SHUTDOWN for the TiDB database. +category: reference +--- + +# SHUTDOWN + +The `SHUTDOWN` statement is used to perform a shutdown operation in TiDB. Execution of the `SHUTDOWN` statement requires the user to have `SHUTDOWN privilege`. + +## Synopsis + +**Statement:** + +![Statement](/media/sqlgram/ShutdownStmt.png) + +## Examples + +{{< copyable "sql" >}} + +```sql +SHUTDOWN; +``` + +``` +Query OK, 0 rows affected (0.00 sec) +``` + +## MySQL compatibility + +> **Note:** +> +> Because TiDB is a distributed database, the shutdown operation in TiDB stops the client-connected TiDB instance, not the entire TiDB cluster. + +The `SHUTDOWN` statement is partly compatible with MySQL. If you encounter any compatibility issues, you can report the issues [on GitHub](/report-issue.md).