Batch kill mysql process if a large number of operations can be generated through a series of select statements, then theoretically these results can be batch processed. Www.2cto.com, but mysql does not provide the eval function for analyzing the result set. Therefore, you can only save the select result to a temporary file and then execute the commands in the temporary file. The specific process is as follows: 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/a.txt'; Query OK, 2 rows affected (0.00 sec) mysql> source/tmp/a.txt; Query OK, 0 rows affected( 0.00 sec)