mytop是一个类似Linux下的 top命令风格的MySQL监控工具,可以监控当前的连接用户和正在执行的命令。
1. 安装TermReadKey
下载地址:http://search.cpan.org/CPAN/authors/id/J/JS/JSTOWE/TermReadKey-2.30.tar.gz
安装:
tar xzvf TermReadKey
cd TermReadKey
perl Makefile.pl
make
make test
make install
2. 安装DBI
下载地址:http://search.cpan.org/search?dist=DBI
安装:
tar xzvf DBI-1.631.tar.gz
cd DBI-1.631
perl Makefile.pl
make
make test
make install
安装过程中提示Error info:
Warning: prerequisite DBD::mysql 3 not found
这是因为缺少perl-MySQL-DBD包
yum install perl-DBD-MySQL
sudo apt-get install yum
然后,重新编译
perl Makefile.PL
make
make test
make install