溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

記一次Mysql 數(shù)據(jù)庫遷移后報錯問題

發(fā)布時間:2020-07-21 11:40:28 來源:網(wǎng)絡(luò) 閱讀:860 作者:spark_Gg 欄目:MySQL數(shù)據(jù)庫

現(xiàn)象說明:老數(shù)據(jù)庫版本是5.6,新庫版本5.7,數(shù)據(jù)量不大,備份恢復(fù)數(shù)據(jù)均正常,配置主從使用gtid復(fù)制后也是正常的,第二天查看新庫的時候,發(fā)現(xiàn)新庫復(fù)制出現(xiàn)問題,報錯如下:

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 ''

查看數(shù)據(jù)庫的變量參數(shù) slave_parallel_workers ,發(fā)現(xiàn)老庫的是0,串行復(fù)制,新庫的是4,并行組復(fù)制,根據(jù)網(wǎng)上查到的內(nèi)容,也是由于這個參數(shù)導(dǎo)致
修復(fù)方法:修改新庫的slave_parallel_workers 參數(shù)為0,清理數(shù)據(jù)庫,清理binlog 日志,恢復(fù)數(shù)據(jù),重建主從關(guān)系,主從復(fù)制OK

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI