Skip to content

Commit 95ce9c4

Browse files
authored
Update KILL TIDB descriptions for v5.3 (#15612) (#16976)
1 parent 312b8c8 commit 95ce9c4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

sql-statements/sql-statement-kill.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,31 @@ mysql> SHOW PROCESSLIST;
2626
| 2 | root | 127.0.0.1 | | Sleep | 4 | 2 | |
2727
+------+------+-----------+------+---------+------+-------+------------------+
2828
2 rows in set (0.00 sec)
29+
```
30+
31+
You can get the TiDB Server details of a session to be killed by querying the `INSTANCE` column of `INFORMATION_SCHEMA.CLUSTER_PROCESSLIST`:
2932

33+
```sql
34+
SELECT ID, USER, INSTANCE, INFO FROM INFORMATION_SCHEMA.CLUSTER_PROCESSLIST;
35+
```
36+
37+
```sql
38+
+---------------------+------+-----------------+-----------------------------------------------------------------------------+
39+
| ID | USER | INSTANCE | INFO |
40+
+---------------------+------+-----------------+-----------------------------------------------------------------------------+
41+
| 1 | root | 127.0.0.1:10082 | SELECT ID, USER, INSTANCE, INFO FROM INFORMATION_SCHEMA.CLUSTER_PROCESSLIST |
42+
| 2 | root | 127.0.0.1:10080 | |
43+
+---------------------+------+-----------------+-------------------------------------------------------------
44+
2 rows in set (0.00 sec)
45+
```
46+
47+
To execute the `KILL TIDB` statement, connect to the TiDB node where the session needs to be killed:
48+
49+
```shell
50+
mysql -h 127.0.0.1 -P 10080 -u root -p
51+
```
52+
53+
```sql
3054
KILL TIDB 2;
3155
Query OK, 0 rows affected (0.00 sec)
3256
```

0 commit comments

Comments
 (0)