Reese Knowledgebase

Watch active MySQL queries as they come and go

View Kristian Reese's profile on LinkedIn


If you like this article, please +1 or Recommend via FB with the provided buttons above:

Article ID: 128
by: Reese K.
Posted: 13 Sep, 2013
Last updated: 13 Sep, 2013
Views: 1032

The watch command is one of my favorite commands.  Sometimes, it may be helpful to watch active queries pop in and out, and the watch command can do that for you!

#~ watch "mysqladmin -u admin -p'`cat /etc/psa/.psa.shadow`' processlist"

I do a lot of Virtuozzo work so this example is somewhat tailored towards that, but the command will work for any mysql use case.  Just simply assign the appropriate user id to the -u option, and supply nothing to the -p option if you wish to enter the password such that it isn't viewable to other users who may look at the bash history!

This article was:   Helpful | Not Helpful
Also listed in
folder VPS

Prev   Next
[ERROR] /usr/libexec/mysqld: Incorrect information in file     Error connecting to database

RSS