Each connection to mysqld runs in a separate thread.  You can see
which threads are running with the SHOW PROCESSLIST statement and kill
a thread with the KILL thread_id statement.

As of MySQL 5.0.0, KILL allows the optional CONNECTION or
QUERY modifiers:


 --- KILL CONNECTION is the same as KILL with no modifier:
It terminates the connection associated with the given thread_id.

 --- KILL QUERY terminates the statement that the connection currently
is executing, but leaves the connection intact.


If you have the PROCESS privilege, you can see all threads.
If you have the SUPER privilege, you can kill all threads and
statements.  Otherwise, you can see and kill only your own threads and
statements.

You can also use the mysqladmin processlist and mysqladmin kill
commands to examine and kill threads.

Note: You currently cannot use KILL with the Embedded MySQL
Server library, because the embedded server merely runs inside the threads
of the host application, it does not create connection threads of its own.
