ITPub博客

首页 > 数据库 > MySQL > Mysql比对主从数据库是否一致

Mysql比对主从数据库是否一致

原创 MySQL 作者:wzgchen 时间:2016-03-18 10:58:17 0 删除 编辑

从库配置:
report-host=192.168.3.70
report-port =3306


主库比对:指定从库
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      0      0       28       1       0   0.008 drama.app_user
03-18T10:56:16      0      0        0       1       0   0.005 drama.joblock
03-18T10:56:16      0      0        0       1       0   0.004 drama.role
03-18T10:56:16      0      0        0       1       0   0.003 drama.stepsettle
03-18T10:56:16      0      0      343       1       0   0.007 drama.supplierinfo
03-18T10:56:16      0      0        0       1       0   0.004 drama.user_role
03-18T10:56:16      0      0        0       1       0   0.004 drama.webmodule
03-18T10:56:16      0      0        0       1       0   0.004 drama.webmodule_role

DIFFS:代表不一致,一致为0

或
在主库上,指定主库(--host=192.168.3.22)
pt-table-checksum --user=root --password=qC0QKFiX --host=172.28.3.22  --databases=drama --no-check-binlog-format


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/91975/viewspace-2059362/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-05-01

  • 博文量
    383
  • 访问量
    213571