The MySQL KILL command as the name suggests kills queries that are running.
After identifying the Id using the SHOW PROCESSLIST command, the User of the connection/thread or a database user with SUPER privileges can execute KILL [id]; to remove the connection/thread.
However, there is an ability to kill just the query that is being executed rather the entire connection. The default when not specified is to kill the connection, however you can optional specify the CONNECTION or QUERY keywords.
For example, below is an interactive test.
Thread 1:
mysql> select sleep(10);
Thread 2:
mysql> show processlist; +----+------+-----------+------+---------+------+-----------+------------------+ | Id | User | Host | db | Command | Time | State | Info | …[Read more]