mysql> show processlist;
+----+------+---------------------+--------------------+---------+------+-------------+------------------+
| Id | User | Host                | db                 | Command | Time | State       | Info             |
+----+------+---------------------+--------------------+---------+------+-------------+------------------+
| 36 | root | 172.16.100.19:7954  | tpcc_test          | Sleep   |    8 |             | NULL             |
| 37 | root | 172.16.100.19:7969  | tpcc_test          | Sleep   |    8 |             | NULL             |
| 42 | root | localhost           | NULL               | Query   |    0 | System lock | show processlist |
| 43 | root | 10.0.102.204:49224  | employees          | Sleep   | 2564 |             | NULL             |
| 44 | root | 172.16.100.19:14529 | NULL               | Sleep   | 2322 |             | NULL             |
| 45 | root | 172.16.100.19:14770 | information_schema | Sleep   | 2315 |             | NULL             |
| 46 | root | 172.16.100.19:1508  | information_schema | Sleep   | 2314 |             | NULL             |
| 47 | root | 172.16.100.19:10572 | performance_schema | Sleep   | 2231 |             | NULL             |
| 48 | root | 172.16.100.19:11392 | performance_schema | Sleep   | 2231 |             | NULL             |
+----+------+---------------------+--------------------+---------+------+-------------+------------------+
9 rows in set (0.00 sec)

mysql> kill 43;              #kill掉43线程
Query OK, 0 rows affected (0.00 sec)

mysql> show processlist;
+----+------+---------------------+--------------------+---------+------+-------------+------------------+
| Id | User | Host                | db                 | Command | Time | State       | Info             |
+----+------+---------------------+--------------------+---------+------+-------------+------------------+
| 36 | root | 172.16.100.19:7954  | tpcc_test          | Sleep   |  386 |             | NULL             |
| 37 | root | 172.16.100.19:7969  | tpcc_test          | Sleep   |  386 |             | NULL             |
| 42 | root | localhost           | NULL               | Query   |    0 | System lock | show processlist |
| 44 | root | 172.16.100.19:14529 | NULL               | Sleep   | 3300 |             | NULL             |
| 45 | root | 172.16.100.19:14770 | information_schema | Sleep   | 3293 |             | NULL             |
| 46 | root | 172.16.100.19:1508  | information_schema | Sleep   | 3292 |             | NULL             |
| 47 | root | 172.16.100.19:10572 | performance_schema | Sleep   | 3209 |             | NULL             |
| 48 | root | 172.16.100.19:11392 | performance_schema | Sleep   | 3209 |             | NULL             |
+----+------+---------------------+--------------------+---------+------+-------------+------------------+
8 rows in set (0.00 sec)

发表评论

邮箱地址不会被公开。 必填项已用*标注