mysql 主从服务-主从复制数据一致性校验出现的问题

使用校验命令出现的问题

pt-table-checksum --nocheck-replication-filters --replicate=check_data.checksums --databases=mytest --tables=user --user=slave --password=slave


问题一:

08-06T09:41:00 DBI connect(’;host=localhost;mysql_read_default_group=client’,‘slave’,…) failed: Authentication plugin ‘caching_sha2_password’ cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: 无法打开共享对象文件: 没有那个文件或目录 at /usr/bin/pt-table-checksum line 1623.

解决办法:

首先主从服务连接起来,然后再次新增一个用户,也需要赋予权限,然后再把上面的那个命令 --user --password 改为新增的用户即可解决。

新增用户请看这个文章:https://blog.csdn.net/qq_39408664/article/details/119385299


问题二:

Replica localhost.localdomain has binlog_format ROW which could cause pt-table-checksum to break replication. Please read “Replicas using row-based replication” in the LIMITATIONS section of the tool’s documentation. If you understand the risks, specify --no-check-binlog-format to disable this check

解决办法:

没有加上跳过检查 binlog 日志的指令;--no-check-binlog-format;改为:

pt-table-checksum --nocheck-replication-filters --no-check-binlog-forma --replicate=check_data.checksums --databases=mytest --tables=user --user=slave --password=slave


问题三:

Replica localhost.localdomain is stopped. Waiting.
Replica localhost.localdomain is stopped. Waiting.
Replica localhost.localdomain is stopped. Waiting.
Replica localhost.localdomain is stopped. Waiting.
Replica localhost.localdomain is stopped. Waiting.
Replica localhost.localdomain is stopped. Waiting.
Replica localhost.localdomain is stopped. Waiting.
Replica localhost.localdomain is stopped. Waiting.

解决办法:

从服务没有连接上,检查一下主库使用的 binlog 文件,从库再执行一次连接即可。

连接方法请看这个文章:https://blog.csdn.net/qq_39408664/article/details/119388103


问题四:

Diffs cannot be detected because no slaves were found. Please read the --recursion-method documentation for information.
在这里插入图片描述

解决办法:

  1. 如果在虚拟机中,需要把防火墙给关掉即可。
  2. 如果在服务器中,需要添加防火墙的规则即可。




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值