In Mysql, If we want to kill the multiple sessions quickly. Use below sql statement to generate the "KILL statements for the ID's and decide based on the once to kill.
SELECT GROUP_CONCAT(CONCAT('KILL ',id ,' ' ,HOST ,';')) FROM information_schema. processlist WHERE user <> 'system user'
group by ID;
example:
KILL 1 localhost;
KILL 24905 localhost2:1234;
No comments:
Post a Comment