加入收藏 | 设为首页 | 会员中心 | 我要投稿 黄山站长网 (https://www.0559zz.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

怎么理解Mysql GITD复制中断处置

发布时间:2021-12-18 14:03:57 所属栏目:MySql教程 来源:互联网
导读:怎么理解Mysql GITD复制中断处理,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。 从库发现复制错误: root@localhost:mysqld.sock [test]show slave statusG; ************************
怎么理解Mysql GITD复制中断处理,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。
 
从库发现复制错误:
 "root@localhost:mysqld.sock  [test]>show slave statusG;
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 192.168.2.54
                  Master_User: repl
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000010
          Read_Master_Log_Pos: 2513
               Relay_Log_File: virtdb55-relay-bin.000002
                Relay_Log_Pos: 1305
        Relay_Master_Log_File: mysql-bin.000010
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
              Replicate_Do_DB:
          Replicate_Ignore_DB:
           Replicate_Do_Table:
       Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
  Replicate_Wild_Ignore_Table:
                   Last_Errno: 1051
                    Last_Error: Error 'Unknown table 'test.t1'' on query. Default database: 'test'. Query: 'DROP TABLE "t1" /* generated by server */'
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 1135
 
Relay_Master_Log_File: mysql-bin.000010:为从库sql线程读取master log file位置
Exec_Master_Log_Pos: 1135:为从库sql线程读到master log pos位置
 
SET @@SESSION.GTID_NEXT= '8b8cad8e-053c-11e6-b500-5254006f0b84:6'/*!*/;  设定该GTID,就跳过了该event.
 
跳过该复制错误
stop slave;  
SET @@SESSION.GTID_NEXT= '8b8cad8e-053c-11e6-b500-5254006f0b84:6'/*!*/;
begin;commit;  
set gtid_next="AUTOMATIC";  
start slave;  
 
看完上述内容,你们掌握怎么理解Mysql GITD复制中断处理的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注亿速云行业资讯频道,感谢各位的阅读!

(编辑:黄山站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!