MySQL Monitoring – Using Mytop for Multiple Servers

monitoringMySQLperformancequery-performance

I have multiple MySQL servers running on CentOS. I would like to use mytop to monitor real time database query activities, but do not want to install mytop locally on each of my MySQL instances. How can I install mytop on a network server to monitor multiple MySQL servers (nodes) on the same network just by running a command like the one below for example:

mytop -h db-test-1

This should display results for database db-test-1, and for db-test-2 or 3, just basically change the db hostname appropriately.

Best Answer

Magicly, mytop thought of your question, a decade in advance, and had a -h flag. It also supports -u for user, -p for password, -P for port, and other options as per the mytop pod page in a similar way to mysql.

So you're able use it on a remote host like:

mytop -h db-test-1