mysql批量kill语句
mysql服务器负载太大,卡死 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/kill.txt'; Query OK, 2 rows affected (0.00 sec) mysql> source /tmp/kill.txt; Query OK, 0 rows affected (0.00 sec)
一些事情一直在干,说不定以后就结果了呢
本文来自博客园,作者:chenjianwen,转载请注明原文链接:https://www.cnblogs.com/chenjw-note/p/17096546.html