How to kill sleep/idle/zombie processes in mysql.

Connect to mysql console and generate rds_kill command list with:

SELECT GROUP_CONCAT('CALL mysql.rds_kill(', id SEPARATOR '); ') AS kill_list
FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE command='Sleep';

Copy the output from above step and run them as commands.

CALL mysql.rds_kill('12345'); CALL mysql.rds_kill('23456'); ...
Post tagged with: mysql, db