mysql主從跳過錯誤的示例分析-創(chuàng)新互聯(lián)

小編給大家分享一下mysql主從跳過錯誤的示例分析,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

創(chuàng)新互聯(lián)建站專業(yè)為企業(yè)提供松滋網(wǎng)站建設(shè)、松滋做網(wǎng)站、松滋網(wǎng)站設(shè)計、松滋網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計與制作、松滋企業(yè)網(wǎng)站模板建站服務(wù),10余年松滋做網(wǎng)站經(jīng)驗,不只是建網(wǎng)站,更提供有價值的思路和整體網(wǎng)絡(luò)服務(wù)。

非gtid:
stop slave;

set global sql_slave_skip_counter=1;

start slave;


有g(shù)tid的情況:

  1. mysql> show slave status\G;
    *************************** 1. row ***************************
                   Slave_IO_State: Waiting for master to send event
                      Master_Host: 192.168.2.71
                      Master_User: repl
                      Master_Port: 3306
                    Connect_Retry: 60
                  Master_Log_File: bin.000106
              Read_Master_Log_Pos: 507171444
                   Relay_Log_File: relay.000029
                    Relay_Log_Pos: 927311065
            Relay_Master_Log_File: bin.000105
                 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: 1032
                       Last_Error: Could not execute Update_rows event on table cus_0042.stat_staff_performance; Can't find record in 'stat_staff_performance', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log bin.000105, end_log_pos 927311644
                     Skip_Counter: 0
              Exec_Master_Log_Pos: 927310864
                  Relay_Log_Space: 1580915694
                  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: Could not execute Update_rows event on table cus_0042.stat_staff_performance; Can't find record in 'stat_staff_performance', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log bin.000105, end_log_pos 927311644
      Replicate_Ignore_Server_Ids: 
                 Master_Server_Id: 71
                      Master_UUID: c9c73c70-c089-11e7-8544-00163e0ad76e
                 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: 171206 13:31:50
                   Master_SSL_Crl: 
               Master_SSL_Crlpath: 
               Retrieved_Gtid_Set: c9c73c70-c089-11e7-8544-00163e0ad76e:49794684-62500914
                Executed_Gtid_Set: c9c73c70-c089-11e7-8544-00163e0ad76e:1-61492947
                    Auto_Position: 1
             Replicate_Rewrite_DB: 
                     Channel_Name: 
               Master_TLS_Version: 
    1 row in set (0.00 sec)

  2. mysql> stop slave;

  3. Query OK, 0 rows affected (0.00 sec)

  4. mysql> set gtid_next='c9c73c70-c089-11e7-8544-00163e0ad76e:61492948';

  5. Query OK, 0 rows affected (0.00 sec)

  6. mysql> begin;

  7. Query OK, 0 rows affected (0.00 sec)

  8. mysql> commit;

  9. Query OK, 0 rows affected (0.00 sec)

  10. mysql> set gtid_next='AUTOMATIC';

  11. Query OK, 0 rows affected (0.00 sec)

  12. mysql> start slave;

  13. Query OK, 0 rows affected (0.00 sec)

以上是“mysql主從跳過錯誤的示例分析”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道!

當(dāng)前名稱:mysql主從跳過錯誤的示例分析-創(chuàng)新互聯(lián)
本文網(wǎng)址:http://muchs.cn/article6/dshpig.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站排名、網(wǎng)站設(shè)計公司、電子商務(wù)、定制網(wǎng)站、網(wǎng)站策劃面包屑導(dǎo)航

廣告

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

成都定制網(wǎng)站建設(shè)