mysql從庫(kù)誤刪數(shù)據(jù)后和gtid復(fù)制斷開(kāi)后怎么處理

這篇文章主要介紹了MySQL從庫(kù)誤刪數(shù)據(jù)后和gtid復(fù)制斷開(kāi)后怎么處理,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。

創(chuàng)新互聯(lián)長(zhǎng)期為成百上千客戶提供的網(wǎng)站建設(shè)服務(wù),團(tuán)隊(duì)從業(yè)經(jīng)驗(yàn)10年,關(guān)注不同地域、不同群體,并針對(duì)不同對(duì)象提供差異化的產(chǎn)品和服務(wù);打造開(kāi)放共贏平臺(tái),與合作伙伴共同營(yíng)造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為劍河企業(yè)提供專業(yè)的網(wǎng)站設(shè)計(jì)制作、成都做網(wǎng)站,劍河網(wǎng)站改版等技術(shù)服務(wù)。擁有十多年豐富建站經(jīng)驗(yàn)和眾多成功案例,為您定制開(kāi)發(fā)。



情景: 應(yīng)該是主庫(kù)上刪數(shù)據(jù),結(jié)果從庫(kù)上先刪了一下,然后主庫(kù)再次刪的時(shí)候?qū)е聫膸?kù)的同步斷開(kāi)
報(bào)錯(cuò):


root@xhh_test 01:58:58>SHOW SLAVE status\G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 10.13.28.52
                  Master_User: repl
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: binlog.000006
          Read_Master_Log_Pos: 1375851
               Relay_Log_File: relaylog.000012
                Relay_Log_Pos: 1345735
        Relay_Master_Log_File: binlog.000006
             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: mysql.%
                   Last_Errno: 1032
                   Last_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 0 failed executing transaction 'a42e8e2b-886a-11e7-962b-00155d1cca18:121' at master log binlog.000006, end_log_pos 1345900. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 1345608
              Relay_Log_Space: 1376222
              Until_Condition: None
               Until_Log_File: 
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File: 
           Master_SSL_CA_Path: 
              Master_SSL_Cert: 
            Master_SSL_Cipher: 
               Master_SSL_Key: 
        Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 1032
               Last_SQL_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 0 failed executing transaction 'a42e8e2b-886a-11e7-962b-00155d1cca18:121' at master log binlog.000006, end_log_pos 1345900. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
  Replicate_Ignore_Server_Ids: 
             Master_Server_Id: 523306
                  Master_UUID: a42e8e2b-886a-11e7-962b-00155d1cca18
             Master_Info_File: mysql.slave_master_info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: 
           Master_Retry_Count: 86400
                  Master_Bind: 
      Last_IO_Error_Timestamp: 
     Last_SQL_Error_Timestamp: 180224 13:56:50
               Master_SSL_Crl: 
           Master_SSL_Crlpath: 
           Retrieved_Gtid_Set: a42e8e2b-886a-11e7-962b-00155d1cca18:2-202
            Executed_Gtid_Set: a42e8e2b-886a-11e7-962b-00155d1cca18:1-120,
a5c5f6cf-886a-11e7-8494-00155d1cca17:1-259408,
aa30ac69-886a-11e7-a031-00155d1cca1a:1-6
                Auto_Position: 1
         Replicate_Rewrite_DB: 




## 找到對(duì)應(yīng)的 事務(wù)編號(hào) 然后跳過(guò)   指定的gtid一定要找對(duì)




stop slave;
set @@session.gtid_next='a42e8e2b-886a-11e7-962b-00155d1cca18:121';
begin;                        
commit;
set @@session.gtid_next=automatic; 
start slave;
show slave status\G

感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“mysql從庫(kù)誤刪數(shù)據(jù)后和gtid復(fù)制斷開(kāi)后怎么處理”這篇文章對(duì)大家有幫助,同時(shí)也希望大家多多支持創(chuàng)新互聯(lián),關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,更多相關(guān)知識(shí)等著你來(lái)學(xué)習(xí)!

網(wǎng)站欄目:mysql從庫(kù)誤刪數(shù)據(jù)后和gtid復(fù)制斷開(kāi)后怎么處理
新聞來(lái)源:http://muchs.cn/article4/jcpooe.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)、定制開(kāi)發(fā)、網(wǎng)站設(shè)計(jì)公司、微信小程序、面包屑導(dǎo)航、靜態(tài)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都app開(kāi)發(fā)公司