How do I monitor what my MySQL server is doing?
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.
E-mail this to a Friend
Printable Version
You may also be interested in other helpful articles:
- Essential tools for monitoring and administrating MySQL Server
- Recover MySQL root password
- MySQL Proxy Load balancing and Failover Tutorial
- MySQL create an Anonymous or limited access only account
- Enable the query cache in MySQL to improve performance
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!


Recent Comments
Today ~ 4 Comments
Today ~ 160 Comments
Today ~ 5 Comments
Yesterday ~ 6 Comments
Yesterday ~ 4 Comments