ITPub博客

首页 > 数据库 > MySQL > Last_IO_Error: Got fatal error 1236 错误解决

Last_IO_Error: Got fatal error 1236 错误解决

原创 MySQL 作者:shawnloong 时间:2016-12-09 11:28:22 0 删除 编辑
修改主从参数导致1236错误,由于之前未忽略表名大小写要求,研发要求忽略大小写敏感
主从增加
lower_case_table_names=1
修改此参数需要重启

重启此参数后
启动从库
2016-12-09T00:48:52.142711Z 13 [Note] Slave I/O thread for channel '': connected to master
'repl@Mysql01-7-57:3306',replication started in log 'bin_log.000028' at position 194
2016-12-09T00:48:52.144687Z 13 [ERROR] Error reading packet from server for channel '': The
slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has
purged binary logs containing GTIDs that the slave requires. (server_errno=1236)

解决此问题方法就是跳过此gtid事务
我们在从库上show slave status \G 记下 Executed_Gtid_Set
从库操作
system@localhost 11:22:  [(none)]> stop slave;
system@localhost 11:23:  [(none)]> set global gtid_purged ='0ea0d2e7-b6c5-11e6-960d-286ed488c63b:1-1258';##执行此操作可能会出错,reset master;
system@localhost 11:24:  [(none)]> set global gtid_purged ='0ea0d2e7-b6c5-11e6-960d-286ed488c63b:1-1258';
system@localhost 11:24:  [(none)]>start slave;
system@localhost 11:26:  [(none)]> show slave status \G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: Mysql01-7-57
                  Master_User: repl
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: bin_log.000029
          Read_Master_Log_Pos: 3966324
               Relay_Log_File: Mysql02-7-58-relay-bin.001824
                Relay_Log_Pos: 2499
        Relay_Master_Log_File: bin_log.000029
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB:
          Replicate_Ignore_DB:
           Replicate_Do_Table:
       Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
  Replicate_Wild_Ignore_Table:
                   Last_Errno: 0
                   Last_Error:
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 3966324
              Relay_Log_Space: 2713
              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: 0
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error:
               Last_SQL_Errno: 0
               Last_SQL_Error:
  Replicate_Ignore_Server_Ids:
             Master_Server_Id: 757
                  Master_UUID: 0ea0d2e7-b6c5-11e6-960d-286ed488c63b
             Master_Info_File: mysql.slave_master_info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
           Master_Retry_Count: 86400
                  Master_Bind:
      Last_IO_Error_Timestamp:
     Last_SQL_Error_Timestamp:
               Master_SSL_Crl:
           Master_SSL_Crlpath:
           Retrieved_Gtid_Set: 0ea0d2e7-b6c5-11e6-960d-286ed488c63b:3821-3822
            Executed_Gtid_Set: 0ea0d2e7-b6c5-11e6-960d-286ed488c63b:1-3822
                Auto_Position: 1
         Replicate_Rewrite_DB:
                 Channel_Name:
           Master_TLS_Version:
1 row in set (0.00 sec)

此错误在percona 文档中也有介绍

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24486203/viewspace-2130133/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-08-29

  • 博文量
    110
  • 访问量
    292630