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;
时间: 2024-11-13 04:14:07