How to Monitor Mysql Database Using Mytop on Oracle Linux 8.5
To Monitor MySQL Database using Mytop on Oracle Linux 8.5
Introduction:
Mytop is an open-source, command line tool utilized for monitoring MySQL performance. Mytop connects to a MySQL server and periodically executes the show process list and show global status commands. It then summarizes the information in a useful format. Using Mytop, we can monitor (in real-time) MySQL threads, queries, and uptime as well as see which user is running queries on which database, which are the slow queries, and more. All this information can be used to optimize the MySQL server performance.
Procedure:
Step 1: Check the Version of OS by using the below command
[root@linuxhelp ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.5"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
Step 2: Install mytop using the below command
[root@linuxhelp ~]# yum install mytop
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* rpmforge: mirror1.hs-esslingen.de
* updates: centos.excellmedia.net
lxcenter-updates | 2.5 kB 00:00
Resolving Dependencies
.
.
.
Running Transaction
Installing : mytop-1.7-3.b737f60.el6.noarch 1/1
Verifying : mytop-1.7-3.b737f60.el6.noarch 1/1
Installed:
mytop.noarch 0:1.7-3.b737f60.el6
Complete!
Step 3: Monitor MySQL using Mytop Run by using the below command and start the Mytop shell and provide your root MySQL password when required.
[root@linuxhelp ~]# mytop --prompt
Password:
Step 4: Once you enter your password, Mytop monitoring shell window appears as below.
Step 5: Monitor specific database Use -d option if you want to monitor specific database use the below command
[root@linuxhelp~]# mytop --prompt -d movies
Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to to Monitor MySQL Database using Mytop on Oracle Linux 8.5. Your feedback is much welcome.