wget http://www.percona.com/downloads/percona-toolkit/LATEST/RPM/percona-toolkit-2.2.7-1.noarch.rpm
yum install perl-IO-Socket-SSL perl-DBD-MySQL perl-Time-HiRes -y
yum install -y percona-toolkit-2.2.7-1.noarch.rpm
grant all privileges on percona.* to repl_user@'%' IDENTIFIED BY '12345678';
GRANT DELETE,UPDATE,SELECT,LOCK TABLES,PROCESS,SUPER on *.* to repl_user@'%';
flush privileges;
truncate table percona.checksums;
pt-table-checksum --host='192.168.1.2' --user='repl_user' --password='12345678' --port='3306' --databases=test--tables=t1 --recursion-method=processlist --no-check-binlog-format
如果是DSN方式的,可以只指定检测指定的IP:
use percona;
CREATE TABLE `dsns` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) DEFAULT NULL, `dsn` varchar(255) NOT NULL, P