4 useful command line tools to monitor MySQL performance on Linux

There are many performance monitoring tools MySQL and server troubleshooting, but they aren’t always ideal for a developer or administrator MySQL , or may not work in some situations, such as remotely or via web monitoring.

MySQL monitoring tools

Fortunately, there are many open source community tools out there. MySQL to fill in the blanks. On the other hand, it is very difficult to find these tools using a web search, this is the reason why we have collected 4 command line tools Database MySQL for monitoring uptime , load and productivity in Linux

Uptime means how long the database was started until it was last shut down or rebooted. Obtaining uptime information is very important in many situations as it helps system administrators check the status MySQL databases how many queries per second, how many MySQL database serves, threads, slow queries and a lot of interesting statistics.

1. Mytop

MyTOP is one of the classic free open source console based (no GUI) database monitoring tool MySQL , was written Jereme zawodny with language Perl … MyTOP runs in a terminal and displays statistics about streams, requests, slow requests, uptime, load, etc. in tabular format, very similar to top in Linux. This indirectly helps administrators to optimize and improve MySQL performance to handle large queries and reduce server load.

MyTOP: Mysql Monitoring

There are MyTOP packages available for various Linux distributions such as Ubuntu , Fedora and CentOS … More information on installation can be found at MyTOP – Monitoring MySQL Database on CentOS.

2. Mtop

Mtop (MySQL top) is another similar open source, command line-based real-time MYSQL server monitoring tool written in the language Perl , displays results in tabular format the same as MyTOP … Mtop keeps track of MySQL queries that take the most time to complete and kills long running queries after a certain specified time.

In addition, it also gives us the ability to identify performance issues, configuration information, performance statistics, and tuning from the CLI. These two tools are very similar, but Mtop not actively supported and may not work on a newly installed version of MySQL.

Install Mtop on Linux

Mtop preview

3. Innotop

Innotop is a command line real time based research program for monitoring local and remote MySQL servers running an operating system InnoDB … Innotop includes many functions and comes with different types of modes / options that help us monitor various aspects of MySQL performance, figure out what is wrong with the MySQL server.

Install Innotop on Linux

Innotop preview

4. Mysqladmin

Mysqladmin is the default string jq command in MySQL client that comes pre-installed with the MySQL package to perform administrative operations such as monitoring processes, checking server configuration, reloading privileges, current state, setting a password, changing a password, creating / deleting a database, and much more.

To check the status of MySQL as well as smooth operation, run the following command from the terminal, and make sure you have root permission to run the command from the command line.

                      [[email protected] ~]# mysqladmin -u root -p version
Enter password:

Output example

                      mysqladmin  Ver 8.42 Distrib 5.1.61, for redhat-linux-gnu on i386
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
Server version		5.1.61-log
Protocol version	10
Connection		Localhost via UNIX socket
UNIX socket		/var/lib/mysql/mysql.sock
Uptime:			20 days 54 min 30 sec
Threads: 1  Questions: 149941143  Slow queries: 21  Opens: 752  Flush tables: 1  Open tables: 745  Queries per second avg: 86.607


If you are looking for a good tool to monitor your own work, it is recommended MyTOP and innotop … Many have used MyTOP for daily monitoring purposes, but then move on to innotop because it displays a lot more statistics and information, including important transactions.

Related Posts