bulk kill mysql processlist
mysql> select group_concat(concat('KILL ',id,';')) from
information_schema.processlist where user='root' and time > 500;
mysql> source /tmp/a.txt;
3.89
9
SELECT CONCAT('KILL ',id,';') AS IDs
FROM information_schema.processlist
WHERE TIME >10
AND command = "sleep"
Thank you!
9
0
Are there any code examples left?
New code examples in category SQL