關於SQLyog操作Mysql雙主、主從複製異常問題


本人遇到的問題發生在mysql 5.6.21 M-M中:

Master1 Server version: 5.6.21-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)

Master2 Server version: 5.6.21-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)

Master1 Os version: CentOS release 6.5 (Final) 

Master2 Os version: CentOS release 6.5 (Final) 


同步相關參數:

Master1:

server-id=1

log-slave-updates

auto_increment_increment=2

auto_increment_offset=1

replicate-do-db=*****

relay_log_recovery

Master2:

server-id=2

log-slave-updates

auto_increment_increment=2

auto_increment_offset=2

replicate-do-db=*****

relay_log_recovery


問題描述:

SQLyog對Master1做DML操作時,記錄未同步到Master2對應庫表裏;使用其他工具操作mysql,同步正常


排查過程:

1.首先查看Master1和Master2的master、slave狀態,均顯示基本正常;

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it

2.然後查看errlog,無相關錯誤信息


3.用mysqlbinlog解析master2的relay log和binlog,發現在relay log中存在SQLyog工具的DML語句,但是在binlog裏面沒有出現該DML語句


相關分析:

在“slave” 的relay中找到了相關sql,但是在binlog中沒找到該sql,說明salve I/O線程日誌的同步正常;只是slave SQL線程執行SQL有異常,

但是查看master和slave的狀態,均顯示正常,而且無報錯信息。網上查找相關資料,發現幾個SQLyog同步問題比較典型的帖子,但均無解決辦

法:

http://blog.csdn.net/linvo/article/details/6566215

http://bbs.csdn.net/topics/390672280


請求大神們能幫忙解釋一下此問題。



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章