Last Updated: February 25, 2016
·
407
· tjuice

Simple "Top" for MySQL

I do not own the credits of this pro tip. I found it in an blog entry of Ted Naleid Poor mans top for mysql , but I want to share it, cause I use it regularly, because it is really handy to check whats going on on your MySQL Server.

The Idea is to use the linux watch command to fire an SHOW FULL PROCESSLIST\G regularly every n seconds.

In this example the update interval is set via the -n 5 property to 5 seconds

watch -n 5 --differences "mysql -u username -psecretpasswd -e 'SHOW FULL PROCESSLIST\G'"