Get the App
SLTechnology News&Howtos  ›  Database  › 

How to compare whether the master-slave database is consistent in Mysql

Shulou Source: shulou.com Published: 2022-05-31 19:43:11 10月27日 Update

How to compare the master-slave database in Mysql? I believe many inexperienced people don't know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

From the library configuration:

Report-host=192.168.3.70

Report-port = 3306

Master library comparison: specify slave library

Pt-table-checksum-user=root-password=123456-host=192.168.3.70-databases=drama

Diffs cannot be detected because no slaves were found. Please read the-- recursion-method documentation for information.

TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE

03-18T10:56:16 00 28 10 0.008 drama.app_user

03-18T10:56:16 00 0 10 0.005 drama.joblock

03-18T10:56:16 00 0 10 0.004 drama.role

03-18T10:56:16 00 0 10 0.003 drama.stepsettle

03-18T10:56:16 00 343 10 0.007 drama.supplierinfo

03-18T10:56:16 00 0 10 0.004 drama.user_role

03-18T10:56:16 00 0 10 0.004 drama.webmodule

03-18T10:56:16 00 0 10 0.004 drama.webmodule_role

DIFFS: it stands for inconsistency. Consensus is 0.

Or

On the primary library, specify the primary library (--host=192.168.3.22)

Pt-table-checksum-user=root-password=qC0QKFiX-host=172.28.3.22-databases=drama-no-check-binlog-format

After reading the above, have you mastered the method of comparing master-slave databases in Mysql? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Consistent master-slave data database content method more problem helpless for this representative reason this skills article experience industry information information channel channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Technology Apple Xiaomi macOS