记一次Mysql数据库迁移后报错问题

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

成都创新互联公司主要从事网站设计、网站制作、网页设计、企业做网站、公司建网站等业务。立足成都服务冷水滩,十年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:028-86922220

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


本文标题:记一次Mysql数据库迁移后报错问题
网站路径:http://hxwzsj.com/article/pjsgeg.html

其他资讯

Copyright © 2025 青羊区翔捷宏鑫字牌设计制作工作室(个体工商户) All Rights Reserved 蜀ICP备2025123194号-14
友情链接: 成都品牌网站建设 手机网站建设套餐 网站设计 成都网站制作 成都网站建设 网站建设费用 网站设计 盐亭网站设计 成都网站建设 成都网站建设 泸州网站建设 四川成都网站设计 网站建设公司 企业网站制作 成都营销网站制作 网站建设推广 网站制作 成都商城网站建设 成都企业网站建设公司 企业网站设计 网站设计公司 网站制作