Summary of errors encountered by pt-table-checksum during verification

Error 1

Skipping table db.table because on the master it would be checksummed in one chunk but on these replicas it has too many rows

Reason: The parameter –chunk-size-limit is 2 by default. When a large table with a large number of rows is encountered, pt-table-checksum may skip the check

Solution: You can increase the –chunk-size-limit appropriately according to the output prompt

Error 2

Cannot connect to h=ip,p=password,u=user
This server returned more than one row for SHOW SLAVE STATUS but "channel" was not specified on the command line at pt-table-checksum line 5401.

Reason: Multi-source slave library, the error can be ignored

Error 3

Cannot connect to h=ip,p=password,u=user
08-30T22:31:30 Replication filters are set on these hosts:
hostname
    slave_skip_errors = 1062
Please read the --check-replication-filters documentation to learn how to solve this problem. at pt-table-checksum line 9878.

Reason: The abnormal machine has set the synchronization filter rule

Error 4

Cannot connect to h=ip,p=password,u=user
Cannot connect to h=ip,p=password,u=user
Cannot connect to h=ip,p=password,u=user
Cannot connect to h=ip,p=password,u=user

Reason: The parameter -recursion-method=processlist is used during verification, which means that the show processlist parameter is used to obtain the slave library ip on the main library machine, but not only the slave library ip is obtained by this command, but also other database ips, so it is connected When other machines are not connected

Solution: Change the value of the parameter –recursion-method to –recursion-method dsn=D=db,t=dsns, that is, write the slave library ip that needs to be checked into a table, and the pt verification tool will follow the slave Library information to connect to the slave library, build a table to verify the consistency of the master-slave data

Table building statement:

CREATE TABLE dbname.`dsns` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`parent_id` int(11) DEFAULT NULL,
`dsn` varchar(255) NOT NULL,
PRIMARY KEY (`id`));

Insert statement from library information

insert into dbname.dsns select null,1,'h=slaveip,u=user,p=password,P=port';

Guess you like

Origin blog.csdn.net/weixin_43202081/article/details/108488648