To solve MySQL problems or to optimize MySQL server you need to use special tool called mytop. It is a UNIX top command clone for MySQL server. It updates every few seconds, so you can get a reasonable look at your SQL performance. It is capable of displaying a huge amount of information.
Please note that it needs Perl and other CPAN package to run. If you are using Debian then just install it using apt-get command or Download it from official web site:
# apt-get install mytop
How do I use mytop command?
mytop command needs username and password to access MySQL server. For example if your username is admin and password is 123456 then you can start mytop as follows:
$ mytop -u admin -p 123456
You can also specify database (phpbb) to monitor:
$ mytop -u admin -p 123456 -d phpbb
You can store this information in ~/.mytop file:
vi ~/.mytop
Add config text as follows:
user=admin
pass=123456
host=mysql0.hosting.some.com
db=imail
delay=10
port=3306
socket=
batchmode=0
header=1
color=1
idle=1
mytop is capable of displaying a large amount of information and it supports lots of keyboard shortcut too, so be sure to read the man page and documentation of mtop.
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins

- My 10 UNIX Command Line Mistakes
- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
Facebook it - Tweet it - Print it -
We're here to help you make the most of sysadmin work. So, subscribe!
