1mysql> select group_concat(concat('KILL ',id,';')) from
2information_schema.processlist where user='root' and time > 500;
3
4mysql> source /tmp/a.txt;
1SELECT CONCAT('KILL ',id,';') AS IDs
2FROM information_schema.processlist
3WHERE TIME >10
4AND command = "sleep"
5