Linux下用Mytop监控MySQL资源

https://www.centos.bz/2011/11/linux-install-perl-dbd-mysql/

http://blog.csdn.net/rital/article/details/6035558

 

1. 下载TermReadKey-2.30.tar.gz

tar zxvf TermReadKey-2.30.tar.gz

cd TermReadKey-2.30

perl Makefile.PL

make

make install

2. 下载DBI-1.615.tar.gz

tar zxvf DBI-1.615.tar.gz

cd DBI-1.615

perl Makefile.PL

make

make install

3. 下载DBD-mysql-4.029.tar.gz

tar zxvf DBD-mysql-4.029.tar.gz

cd DBD-mysql-4.029

perl Makefile.PL --mysql_config=/soc/mysql/bin/mysql_config

make

make install

4. 下载mytop-1.6.tar.gz

tar zxvf mytop-1.6.tar.gz

cd mytop-1.6

perl Makefile.PL

make

make install

 

最后执行:

mytop -u root -p mysql -d collector  -h 127.0.0.1:3306

 

OK,大功告成

你可能感兴趣的:(linux)