How To Install Mytop on Ubuntu 16.04 LTS

Install Mytop on Ubuntu 16.04 LTS

In this tutorial, we will show you how to install Mytop on Ubuntu 16.04 LTS server. For those of you who didn’t know, Mytop is an open-source and free monitoring program for MySQL databases, using Perl language and it provides a command-line shell interface to monitor real-time MySQL threads, queries per second, process list, and performance of databases and gives an idea for the database administrator to optimize the server to handle a heavy load.

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 and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you through the step by step installationof  Mytop database performance monitoring on a Ubuntu 16.04 (Xenial Xerus) server.


  • A server running one of the following operating systems: Ubuntu 16.04, and any other Debian-based distribution.
  • 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 Mytop on Ubuntu 16.04 LTS

Step 1. First, make sure that all your system packages are up-to-date by running the following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Mytop.

After the system update, now using the following command below to install mytop:

apt-get install mytop

Step 3. Configuring Mytop.

Create a .mytop file in your root directory. This file will configure Mytop with default settings for the root user. The password line should contain your MySQL root password:

cd /root
nano .mytop

Add the following content to the file and save and exit:


You can now run the “mytop” command to connect to your MySQL database and examine its performance:

MySQL on localhost (5.5.47-MariaDB) up 0+00:47:45 [06:36:47]
Queries: 1.4k qps: 0 Slow: 0.0 Se/In/Up/De(%): 56/06/13/01
qps now: 4 Slow qps: 0.0 Threads: 1 ( 1/ 0) 00/00/00/00
Key Efficiency: 76.9% Bps in/out: 260.6/400.4 Now in/out: 48.1/11.2k
Id User Host/IP DB Time Cmd Query or State
-- ---- ------- -- ---- --- ----------
46 root localhost mysql 0 Query show full processlist

Congratulations! You have successfully installed Mytop. Thanks for using this tutorial for installing Mytop database performance monitoring on Ubuntu 16.04 LTS  (Xenial Xerus) system. For additional help or useful information, we recommend you check the official Mytop 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, 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