异常关机,同时出现:Last_IO_Errno: 1236,Last_SQL_Errno: 1594

一主两从的结构,由于异常关机,导致两个从库都出现如下问题:

mysql> show slave status \G;
*************************** 1. row ***************************
               Slave_IO_State: 
                  Master_Host: 192.168.56.110
                  Master_User: replica
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: 561103306-bin.000007
          Read_Master_Log_Pos: 1250488
               Relay_Log_File: mysqld-relay-bin.000002
                Relay_Log_Pos: 1207291
        Relay_Master_Log_File: 561103306-bin.000007
             Slave_IO_Running: No
            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: 1594
                   Last_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master‘s binary log is corrupted (you can check this by running ‘mysqlbinlog‘ on the binary log), the slave‘s relay log is corrupted (you can check this by running ‘mysqlbinlog‘ on the relay log), a network problem, or a bug in the master‘s or slave‘s MySQL code. If you want to check the master‘s binary log or slave‘s relay log, you will be able to know their names by issuing ‘SHOW SLAVE STATUS‘ on this slave.
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 1250488
              Relay_Log_Space: 1207754
              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: 1236
                Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: ‘Client requested master to start replication from impossible position; the first event ‘561103306-bin.000007‘ at 1250488, the last event read from ‘./561103306-bin.000007‘ at 4, the last byte read from ‘./561103306-bin.000007‘ at 4.‘
               Last_SQL_Errno: 1594
               Last_SQL_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master‘s binary log is corrupted (you can check this by running ‘mysqlbinlog‘ on the binary log), the slave‘s relay log is corrupted (you can check this by running ‘mysqlbinlog‘ on the relay log), a network problem, or a bug in the master‘s or slave‘s MySQL code. If you want to check the master‘s binary log or slave‘s relay log, you will be able to know their names by issuing ‘SHOW SLAVE STATUS‘ on this slave.
  Replicate_Ignore_Server_Ids: 
             Master_Server_Id: 561103306
                  Master_UUID: 
             Master_Info_File: /var/lib/mysql/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: 
           Master_Retry_Count: 86400
                  Master_Bind: 
      Last_IO_Error_Timestamp: 141020 09:57:15
     Last_SQL_Error_Timestamp: 141020 09:57:15
               Master_SSL_Crl: 
           Master_SSL_Crlpath: 
           Retrieved_Gtid_Set: 
            Executed_Gtid_Set: 
                Auto_Position: 0
1 row in set (0.00 sec)

当着两个问题同时出现时,先处理后面一个(errno:1594) ,再处理(error:1236)

Last_SQL_Errno: 1594的处理方法:

mysql>stop slave ;

mysql> change master to master_log_file =‘561103306-bin.000007‘ ,master_log_pos = 1250488;

Last_IO_Errno: 1236的处理方法:

# mysqlbinlog  561103306-bin.000007  >yyf.log

在yyf.log里面找离  1250488位置最近的事件,发现该日志最后一个pos是1248558,那就可以直接切到下一个log的开始位置即可:

mysql> stop slave;

mysql>  change master to master_log_file=‘561103306-bin.000008‘ ,master_log_pos=0;

时间: 2024-10-06 17:49:49

异常关机,同时出现:Last_IO_Errno: 1236,Last_SQL_Errno: 1594的相关文章

Windows 使用 StarWind 创建的 Oracle RAC环境 异常关机之后的处理过程

创建好了 虚拟机之后发现 偶尔会出现 蓝屏重启的现象, 这个时候 需要进行 异常处理 确定虚拟机已经开机之后 1. 打开iscsi的连接设备, 确认 iscsi的正常连接到虚拟机的 存储设备 注意 rac所有节点都需要进行处理 2. 打开windows 的服务 开启几个必须要的 Oracle服务 如图示 与步骤一 一样 也需要 两个节点都开启 3. 在节点1 启动 Oracle的数据库 具体方法见图 开始运行 sqlplus / as sysdba 执行 startup命令 4. WorkSta

mysql从库Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'报错处理

年后回来查看mysql运行状况与备份情况,登录mysql从库查看主从同步状态 1 mysql> show slave status\G; 2 *************************** 1. row *************************** 3 Slave_IO_State: 4 Master_Host: 101.200.*.* 5 Master_User: backup 6 Master_Port: 3306 7 Connect_Retry: 60 8 Master_

mysql报1236错误解决方法

mysql slave状态如下,发现IO线程为NO状态,并且报1236错误代码 mysql> show slave status\G *************************** 1. row ***************************                Slave_IO_State:                    Master_Host: 10.0.0.20                   Master_User: rep             

mysql主从复制1236错误

今天监控显示mysql主从复制出错了,信息如下: mysql> show slave status\G; *************************** 1. row *************************** Slave_IO_State: Master_Host: 192.168.33.230 Master_User: repl Master_Port: 3306 Connect_Retry: 60 Master_Log_File: master-bin.000774 R

mysql 主从 Got fatal error 1236 from master when reading data from binary log: 'Could not find first 错误

本地MySQL环境,是两台MySQL做M-M复制.今天发现错误信息: mysql 5.5.28-log> show slave status\G *************************** 1. row ***************************                Slave_IO_State:                   Master_Host: 88.88.88.88                   Master_User: replicate

mysql-error 1236

今天其中一台游戏服务器的数据库mysql master当机, 系统变为只读模式,重启后进入安全模式,执行fsck后恢复正常.服务器起来之后mysql启动正常,但一台slave却一直出现同步错误. 登录后查看,发现以下错误: mysql> show slave status\G *************************** 1. row ***************************                Slave_IO_State:                  

MySQL主从失败报错误: Got fatal error 1236

一.问题原因及报错误信息 由于MySQL主库意外重启,导致从库无法同步报错如下: 登录从库查看主从同步的错误信息 [[email protected]192-168-7-101 mysql]# vim mysqld-error.log 2018-12-11 12:57:35 1788 [ERROR] Error reading packet from server: Client requested master to start replication from position > file

解决mysql开启GTID主从同步出现1236错误问题

最近遇到mysql开启gtid做复制时,从库出现1236错误,导致同步无法进行,本文就这问题记录下处理步骤,有关gtid知识在这里不做介绍,mysql版本为5.7.16. 一.错误原因分析 错误信息如下: Last_IO_Errno: 1236 Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER

系统异常埋点

DropBox会在以下时机抓取相关信息: a.出异常关机前 SystemServer会收集以下类型报错:watchdog.anr.wtf.lowmem.native_crash.crash TAG = watchdog.anr.wtf.lowmem.native_crash.crash 此时是通过ActivityManagerService.addErrorToDropBox()接口来收集信息并添加到DropBox中,这个在addErrorToDropBox()做拦截抓取更多的日志: 12883