重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

记一次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://cqcxhl.cn/article/pjsgeg.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP