How We Kill mysql sleep processes Like:
+------+-----------+-----------+------------------------+---------+------+----------------+-----------------------------------
The syntax is:
KILL thread_id
In your case:
mysql > KILL 3057
But in order to delete all the sleep processes,one command cant be used, you need to loop through whole processlist,after taking all the processes in tmp table and looping through it:
select concat('KILL ',id,';') from information_schema.processlist where Command='Sleep';
select concat('KILL ',id,';') from information_schema.processlist where Command='Sleep' into outfile '/tmp/a.txt';
Referred from here