时间:2021-07-01 10:21:17 帮助过:2人阅读
mysql> SELECT concat(‘KILL ‘,id,‘;‘) FROM information_schema.processlist WHERE user=‘root‘; +------------------------+ | concat(‘KILL ‘,id,‘;‘) | +------------------------+ | KILL 21107; | +------------------------+ 1 row in set (0.01 sec) mysql> SELECT concat(‘KILL ‘,id,‘;‘) FROM information_schema.processlist WHERE user=‘root‘ INTO OUTFILE ‘/tmp/killid.txt‘; Query OK, 1 row affected (0.01 sec) mysql> source /tmp/killid.txt;
MySQL 批量杀mysql线程
标签: