SELECT CONCAT('KILL ', id, ';') AS kill_command FROM information_schema.processlist WHERE user = 'app_user' AND command != 'Sleep'; Copy the output and execute it.
Killing a MySQL query is a scalpel – precise and effective, but careless use can cut deep. Always pair it with logging and post-mortem analysis to understand why you needed to kill it in the first place.
KILL 12345; Or with the optional CONNECTION keyword (same effect):