How to find and kill a session in Mysql.
select * from information_schema. processlist;
if we want to generate kill statement for 'IDs' the use below sql statement.
SELECT GROUP_CONCAT(CONCAT('KILL ',id ,' ' ,HOST , ' ',command,';')) FROM information_schema. processlist WHERE user <> 'system user'
group by ID;
No comments:
Post a Comment