资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

记一次Mysql数据库迁移后报错问题-创新互联

现象说明:老数据库版本是5.6,新库版本5.7,数据量不大,备份恢复数据均正常,配置主从使用gtid复制后也是正常的,第二天查看新库的时候,发现新库复制出现问题,报错如下:

创新互联建站秉承实现全网价值营销的理念,以专业定制企业官网,成都做网站、成都网站制作,成都微信小程序,网页设计制作,成都手机网站制作网络营销推广帮助传统企业实现“互联网+”转型升级专业定制企业官网,公司注重人才、技术和管理,汇聚了一批优秀的互联网技术人才,对客户都以感恩的心态奉献自己的专业和所长。

2019-10-10T10:15:27.541697+08:00 4256 [Warning] Master server does not support semi-sync, fallback to asynchronous replication
2019-10-10T10:15:29.993985+08:00 4257 [ERROR] Transaction is tagged with inconsistent logical timestamps: sequence_number (3546074770274598260) <= last_committed (8314045271803935669)
2019-10-10T10:15:29.994028+08:00 4257 [Warning] Slave SQL for channel '': Coordinator thread of multi-threaded slave is being stopped in the middle of assigning a group of events; deferring to exit until the group completion ... , Error_code: 0
2019-10-10T10:15:29.994052+08:00 4257 [ERROR] Slave SQL for channel '': Cannot execute the current event group in the parallel mode. Encountered event Gtid, relay-log name ./relay.000002, position 1090573 which prevents execution of this event group in parallel mode. Reason: The master event is logically timestamped incorrectly.. Error_code: 1755
2019-10-10T10:15:29.994066+08:00 4257 [Warning] Slave: Cannot execute the current event group in the parallel mode. Encountered event Gtid, relay-log name ./relay.000002, position 1090573 which prevents execution of this event group in parallel mode. Reason: The master event is logically timestamped incorrectly.. Error_code: 1755
2019-10-10T10:15:29.994070+08:00 4257 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'logbin.000015' position 234960156
2019-10-10T10:16:01.494097+08:00 4256 [Note] Slave I/O thread killed while reading event for channel ''

查看数据库的变量参数 slave_parallel_workers ,发现老库的是0,串行复制,新库的是4,并行组复制,根据网上查到的内容,也是由于这个参数导致
修复方法:修改新库的slave_parallel_workers 参数为0,清理数据库,清理binlog 日志,恢复数据,重建主从关系,主从复制OK

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


本文题目:记一次Mysql数据库迁移后报错问题-创新互联
文章出自:http://cdkjz.cn/article/dpopeg.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220