About Percona installation and use of information, online quite a lot, but everyone encountered a different problem, the point of attention is not the same, so I will pay attention to the things I recorded
Percona-toolkit Installation
1. Download Percona-toolkit source package, percona-toolkit_2.2.15-2.tar.gz
Decompression TAR-ZXVF percona-toolkit_2.2.15-2.tar.gz
CD percona-toolkit_2.2.15-2
Execute the following command
Perl makefile.pl (Install yourself if Perl is not installed)
Make
Make install
2. The tools I used first pt-tables-checksum
Pt-table-checksum--user=xxx--password=xxx--host=xxx--no-check-binlog-format
This time return error, unable to connect to MySQL, need to install Perl DBI
Execute command sudo apt-get install Libdbd-mysql-perl
3. After the installation is complete, continue to test
The results are as follows
TS ERRORS diffs ROWS CHUNKS skipped time TABLE
10-14t03:25:22 0 0 0 1 0 0.040 mysql.columns_priv
10-14t03:25:22 0 0 2 1 0 0.023 mysql.db
10-14t03:25:22 0 0 0 1 0 0.016 mysql.event
10-14t03:25:22 0 0 0 1 0 0.015 mysql.func
10-14t03:25:22 0 0 1 0 0.023 mysql.help_category
10-14t03:25:22 0 0 608 1 0 0.039 Mysql.help_keyword
10-14t03:25:22 0 0 1216 1 0 0.013 mysql.help_relation
10-14t03:25:22 0 0 583 1 0 0.018 Mysql.help_topic
10-14t03:25:22 0 0 0 1 0 0.016 mysql.ndb_binlog_index
10-14t03:25:22 0 0 0 1 0 0.016 mysql.plugin
10-14t03:25:22 0 0 1 1 0 0.013 Mysql.proc
10-14t03:25:22 0 0 0 1 0 0.018 mysql.procs_priv
10-14t03:25:23 0 1 2 1 0 0.013 Mysql.proxies_priv
10-14t03:25:23 0 0 0 1 0 0.018 mysql.servers
10-14t03:25:23 0 0 0 1 0 0.019 mysql.tables_priv
10-14t03:25:23 0 0 0 1 0 0.012 mysql.time_zone
10-14t03:25:23 0 0 0 1 0 0.018 mysql.time_zone_leap_second
10-14t03:25:23 0 0 0 1 0 0.017 mysql.time_zone_name
10-14t03:25:23 0 0 0 1 0 0.021 mysql.time_zone_transition
10-14t03:25:23 0 0 0 1 0 0.013 mysql.time_zone_transition_type
10-14t03:25:23 0 1 1 0 0.014 Mysql.user
The first column, the time to complete the inspection
Second column, checking for errors encountered in the process
The third column, the difference, 0 is consistent, 1 indicates inconsistency
Fourth column, number of rows in the table
Fifth column, Execution time
The sixth column, the table name being checked
The reason for the understanding, mainly because the database is often required to check, if the use of manual testing method time-consuming, and may not be accurate