pt-toolkit 工具使用

pt-table-checksum

在 Master 上运行,pt 会根据 show processlist 、show slave hosts 中的信息去获取从信息。

Diffs cannot be detected because no slaves were found.
需要在从 cnf 中设置 report_host = ip

--nocheck-replication-filters #不检查 replicate_ignore_db 等信息
--no-check-binlog-format #不检查 binlog 格式
pt-table-checksum h=127.0.0.1,u=replicate,p='abcd1234',P=3307 --databases=test --tables=t1 --nocheck-replication-filters --no-check-binlog-format

pt-table-sync

pt-table-sync --print --execute --sync-to-master h=192.168.221.101,P=3307,u=replicate,p='abcd1234' --databases=test --tables=t1

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容