Get the App
SLTechnology News&Howtos  ›  Database  › 

Installation and use of pt-table-checksum,?pt-table-sync and percona-toolkit toolkits

Shulou Source: shulou.com Published: 2022-06-01 06:36:48 11月15日 Update

A very useful tool for percona-toolkit MySQL

For more information, please refer to

Http://www.cnblogs.com/zping/p/5678652.html checks data consistency (provided that the slave library must be active)

Ensure that rep_40 users have access to the main library and the flushing library

The easiest thing to do is to give all permissions.

Pt-table-checksum hackers 192.168.27.40, dba users must be able to access both master and slave libraries, while dba users must be able to access both master and slave libraries

Pt-table-checksum hobbies 127.0.0.1-- nocheck-replication-filters-- set-vars innodb_lock_wait_timeout=50

After execution, you can view the results in the percona.checksums of the library.

This_crcmaster_crc inconsistency represents the difference between master and slave data.

The value of the data block intercepted by crc for the tool after function conversion

You can use the following sql to find tables that are exceptionally inconsistent

Select * from checksums where this_crcmaster_crc

For details, please refer to

The execution of 192.168.27.21 on the https://segmentfault.com/a/1190000004309169 master library is the slave library ip

Print is a statement that prints and modifies the data. is it possible to change the Chinese to pt-table-sync when repairing the data? Be careful when waiting for garbled codes.

Pt-table-sync-- replicate=percona.checksums hobby 127.0.0.1-- print.

The printed sql is executed on the slave library (here you need to be careful)

Execute is to perform a repair

Pt-table-sync-- replicate=percona.checksums hobby 127.0.0.1-- execute.

The printed sql is executed on the slave library (here you need to be careful) check 42 environment-no-check-binlog-format ignores the copy format

Pt-table-checksum hobbies 127.0.0.1-- nocheck-replication-filters-- no-check-binlog-format

Tags: Data consistency checking tools consistency at the same time permissions users statements references master and slave random codes representatives practices functions premises finished that is differences effects Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Xiaomi Shulou Information Shulou Tech Info MariaDB