What is Mysql Doing?

Last modified: 
Tuesday, July 7th, 2015
Topics: 
MySQL

SHOW PROCESSLIST

If you want to peak at what mysql is working on, you can log into mysql and run *SHOW PROCESSLIST** to output, you guessed it, a list of current processes.

mysql> SHOW PROCESSLIST;
+----+------+-----------+------------+---------+------+----------+-----------------------------------------------------------+
| Id | User | Host      | db         | Command | Time | State    | Info                                                      |
+----+------+-----------+------------+---------+------+----------+-----------------------------------------------------------+
| 19 | dev  | localhost | mydb | Sleep   |  751 |          | NULL                                                      |
| 25 | dev  | localhost | mydb | Query   |   12 | updating | DELETE FROM cache_bootstrap 
WHERE  (cid = 'system_list') |
| 27 | root | localhost | mydb | Query   |    0 | init     | SHOW PROCESSLIST                                          |
+----+------+-----------+------------+---------+------+----------+-----------------------------------------------------------+

KILL PROCESS

You can kill a process similar to in *nix land.

KILL 25

This should halt the query DELETE FROM cache_bootstrap WHERE (cid = 'system_list') above.


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.