How To Install Mtop (MySQL Database Server Monitoring) on CentOS 6

Install Mtop (MySQL Database Server Monitoring) on CentOS 6

In this tutorial, we will show you how to install Mtop (MySQL Database Server Monitoring) on your CentOS 6 server. For those of you who didn’t know, Mtop is an open-source real-time MySQL Server monitoring program that shows queries that are taking a long time to process and kills those longer queries after a certain number of specified times. Stop program enables us to monitor and identify performance and related issues of MySQL Server from the command line interface similar to Linux Top Command.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you the step-by-step installation Stop on CentOS 6.


  • A server running one of the following operating systems: CentOS 6.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Mtop (MySQL Database Server Monitoring) on CentOS 6

Step 1. First, let’s start by ensuring your system is up-to-date.

sudo yum update
sudo yum install epel-release

Step 2. Enable the RPMForge repository on your Centos system.

Now enable the RPMForge repository under your Linux machine to download and install the latest version of the MTOP program.

## RHEL/CentOS 6 32-Bit ##

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.i686.rpm

## RHEL/CentOS 6 64-Bit ##

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

Step 3. Installing Mtop on CentOS 6.

Install Mtop using yumthe command:

sudo yum install mtop

Step 4. Starting Mtop.

To start Mtop program, you need to connect to your MySQL server, using the following command:

# mysql -u root -p

mysql> grant super, reload, process on *.* to mysqltop;
Query OK, 0 rows affected (0.00 sec)

mysql> grant super, reload, process on *.* to mysqltop@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit;

Step 5. Running Mtop in CentOS 6.


Mtop usage and functions keys:

s – change the number of seconds to delay between updates
m – toggle manual refresh mode on/off
d – filter display with regular expression (user/host/db/command/state/info)
F – fold/unfold column names in select statement display
h – display process for only one host
u – display process for only one user
i – toggle all/non-Sleeping process display
o – reverse the sort order
q – quit
? – hel

Congratulations! You have successfully installed Mtop. Thanks for using this tutorial for installing Mtop (MySQL Database Server Monitoring) on CentOS 6 system. For additional help or useful information, we recommend you to check the official Mtop website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!




r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button