mysql批量kill locked进度方法
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全选删除就可以了。
补充:数据库,mysql教程