Kill a query or connection (KILL)
MySQLSessionCommand
KILL QUERY 4567;What it does
Terminates the query currently running on the given connection ID without closing the connection.
When to use it
To stop a long-running/stuck query.
Caution
To close the entire connection (session): KILL CONNECTION 4567; (or simply KILL 4567). If a running write transaction is killed, it is rolled back, which can take a long time on large tables.