Wednesday, December 11, 2013

Mysql kill all process listed in process list

Use below steps in terminal to kill all running mysql process -

mysql> select concat('KILL ',id,';') from information_schema.processlist into outfile '/tmp/process.txt';
 

we can also filter process list here by user host etc. by applying them in where clause.

mysql> source /tmp/process.txt;

No comments:

Post a Comment