MySQL Refresh processlist every second

by GarciaPL on Wednesday 9 October 2013

Very useful piece of command line query which will help you to keep an eye on execution time of queries which are performed in your MySQL database. It helps me when I ask myself : 'Hm ... I am wondering if this query is now executed ... '. This question can be sometime annoying, so this is quite helpful adoption of mysqladmin tool.

mysqladmin -u root -p -i 1 processlist

-u your username
-p you be pleased to give database password
-i 1 interval which equals 1 second


Example output :

+----+------+-----------+----+---------+------+-------+------------------+
| Id | User | Host      | db | Command | Time | State | Info             |
+----+------+-----------+----+---------+------+-------+------------------+
| 43 | root | localhost |    | Query   | 0    |       | show processlist |
+----+------+-----------+----+---------+------+-------+------------------+

Reference : [1] Mysqladmin Tool Doc