略微加速

略速 - 互联网笔记

mysql关闭客户端连接/踢下线/kill process

2020-05-06 09:39:24 leiting (4981阅读)

标签 MySql

mysql kill process

mysql> show processlist;
+----+------+-----------+------+---------+------+-------+------------------+
| Id | User | Host      | db   | Command | Time | State | Info             |
+----+------+-----------+------+---------+------+-------+------------------+
|  7 | root | localhost | yy   | Sleep   |  154 |       | NULL             | 
|  8 | root | localhost | NULL | Query   |    0 | NULL  | show processlist | 
+----+------+-----------+------+---------+------+-------+------------------+
2 rows in set (0.00 sec)

mysql> kill 7;

mysql> show processlist;
+----+------+-----------+------+---------+------+-------+------------------+
| Id | User | Host      | db   | Command | Time | State | Info             |
+----+------+-----------+------+---------+------+-------+------------------+
|  8 | root | localhost | NULL | Query   |    0 | NULL  | show processlist | 
+----+------+-----------+------+---------+------+-------+------------------+
1 row in set (0.00 sec)


北京半月雨文化科技有限公司.版权所有 京ICP备12026184号