CentOSLinuxTutorials

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.

Prerequisites

  • 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;
Bye

Step 5. Running Mtop in CentOS 6.

mtop

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!

Save

Save

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button