方法一
1. sudo yum install mysql
2. sudo yum install mysql-server
3. wget
4. cd maatkit-4623
5. perl Makefile.PL
6. sudo make install
使用办法:
1. pager mk-visual-explain
2. explain select statement .....
方法二
maatkit安装
一,安装DBI
cd /root
wget http://ftp.cuhk.edu.hk/pub/packages/perl/CPAN/authors/id/T/TI/TIMB/DBI-1.616.tar.gz
tar zxvf DBI-1.616.tar.gz
cd DBI-1.616
perl Makefile.PL
make && make install
二,安装data-showtable包
cd /root
wget
tar zxvf Data-ShowTable-3.3.tar.gz
cd Data-ShowTable-3.3
perl Makefile.PL
make && make install
三,安装msql-mysql-modules
cd /root
wget
tar zxvf Msql-Mysql-modules-1.2219.tar.gz
cd Msql-Mysql-modules-1.2219
perl Makefile.PL
make && make install
四,安装DBD-mysql
cd /root
wget
tar zxvf DBD-mysql-4.019.tar.gz
cd DBD-mysql-4.019
perl Makefile.PL --mysql_config=/usr/local/mysql/bin/mysql_config
make && make install
五,安装maatkit
cd /root
wget
tar zxvf maatkit-7486.tar.gz
cd maatkit-7486
perl Makefile.PL
make && make install
六,测试
mk-
mk-show-grants
mk-duplicate-key-checker
mk-slave-find -h127.0.0.1 -u'user' -p'passwd'
阅读(1398) | 评论(0) | 转发(0) |