异常关机,同时出现:Last_IO_Errno: 1236,Last_SQL_Errno: 1594
来源:互联网 发布:有住网装修怎么样 知乎 编辑:程序博客网 时间:2024/05/16 08:47
一主两从的结构,由于异常关机,导致两个从库都出现如下问题:
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;
0 0
- 异常关机,同时出现:Last_IO_Errno: 1236,Last_SQL_Errno: 1594
- 一次MySQL主从搭建出现“Last_IO_Errno: 1236”错误的处理记录
- Candence16.6画封装时出现异常关机
- MySQL错误:Last_IO_Errno: 1236处理办法
- 电脑无故关机,出现提示:从异常关机中恢复 bluescreen.........
- Last_SQL_Errno: 1062
- VMware意外关机异常
- Thinkpad 异常关机
- 实体机异常关机,VM再次打开虚拟机时出现报错
- 设置关机后同时关闭鼠标电源
- Last_Errno: 1594 the master's binary log is corrupted Last_SQL_Errno: 1062
- 使用Hibernate集成shiro的时候,同时使用Ehcahce出现异常
- 3.2.3join()方法和interrupt()方法同时使用出现异常
- mysql Last_SQL_Errno: 1032
- 同时多处异常
- 强制关机出现故障解决方案
- MySQL关机重启后出现错误
- Last_IO_Errno: 1236 Last_IO_Error: Got fatal error 1236 from master when reading data from binary lo
- 关于crontab无法编辑的问题
- 责任链模式随记
- cocos2d-x3.2在mac os下打包android系统apk
- 将异常(getStackTrace)转化成String
- dubbo使用遇到的问题
- 异常关机,同时出现:Last_IO_Errno: 1236,Last_SQL_Errno: 1594
- 按钮倒计时
- Android 开发之使用Eclipse Debug调试详解
- ios更改应用在手机上显示的名称
- Creating Apps With Material Design —— Defining Custom Animations
- Android Activity实现切换动画的两种方法
- 上行传输对应的HARQ
- DynamicJasper创建动态报表
- 我的第一篇博客