zoukankan      html  css  js  c++  java
  • 主从跳过事务

    普通主从:
    跳过一个事务
    mysql> set global sql_slave_skip_counter=1;  
    Query OK, 0 rows affected (0.00 sec)
    mysql> start slave;
     
    GTID主从:
    跳过一个GTID
    (root@localhost) [(none)]> show slave statusG
    *************************** 1. row ***************************
                   Slave_IO_State: Waiting for master to send event
                      Master_Host: 192.168.1.201
                      Master_User: root
                      Master_Port: 3306
                    Connect_Retry: 60
                  Master_Log_File: mysql-bin.000013
              Read_Master_Log_Pos: 3163
                   Relay_Log_File: relay-bin.000002
                    Relay_Log_Pos: 2348
            Relay_Master_Log_File: mysql-bin.000013
                 Slave_IO_Running: Yes
                Slave_SQL_Running: No
                       Last_Errno: 1062
                       Last_Error: Could not execute Write_rows event on table test.t; Duplicate entry '3' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-bin.000013, end_log_pos 2611
                     Skip_Counter: 0
              Exec_Master_Log_Pos: 2381
                  Relay_Log_Space: 3371
                  Until_Condition: None
                   Last_SQL_Errno: 1062
                   Last_SQL_Error: Could not execute Write_rows event on table test.t; Duplicate entry '3' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-bin.000013, end_log_pos 2611
      Replicate_Ignore_Server_Ids:
                 Master_Server_Id: 1921681201
                      Master_UUID: 766d5362-c923-11e6-85b5-000c29de38de
                 Master_Info_File: /app/mysqldata/3306/data/master.info
               Retrieved_Gtid_Set: 766d5362-c923-11e6-85b5-000c29de38de:4-14
                Executed_Gtid_Set: 766d5362-c923-11e6-85b5-000c29de38de:1-11,
    ff3d06c1-c923-11e6-8fbf-000c295f1558:1-2
                    Auto_Position: 1
             Replicate_Rewrite_DB:
                     Channel_Name:
               Master_TLS_Version:
    1 row in set (0.00 sec)
     
    (root@localhost) [(none)]> stop slave;
    (root@localhost) [(none)]> set GTID_NEXT='766d5362-c923-11e6-85b5-000c29de38de:12';
    (root@localhost) [(none)]> begin;commit;
    (root@localhost) [(none)]> set GTID_NEXT='AUTOMATIC';
    (root@localhost) [(none)]> start slave;
     
  • 相关阅读:
    MDX查询语句
    MyEclipse 点击 部署 按钮 无效
    C#创建数字证书并导出为pfx,并使用pfx进行非对称加解密
    SSIS – 变量和表达式
    使用 SSIS Foreach Loop 容器 – Foreach Item Enumerator
    SSIS – For Loop Container
    SSIS 中的文件系统任务 (File System Task)
    TypeError: parse() got an unexpected keyword argument 'transport_encoding' 安装tensor后报错
    np基本函数大全
    使用OpenCV对图像进行缩放
  • 原文地址:https://www.cnblogs.com/allenhu320/p/11316392.html
Copyright © 2011-2022 走看看