mysql教程> select concat('kill ',id,';') from information_schema.processlist where user='root';
+------------------------+
| concat('kill ',id,';')
+------------------------+
| kill 3101;
| kill 2946;
+------------------------+
2 rows in set (0.00 sec)mysql> select concat('kill ',id,';') from information_schema.processlist where user='root' into outfile '/tmp/a.txt';
query ok, 2 rows affected (0.00 sec)mysql> source /tmp/a.txt;
query ok, 0 rows affected (0.00 sec)
方法二,直接進入mysql找到information_schema的processlist全選刪除就可以了。