故障现象  :MySQL slave所在机器自动重启,启动MySQL后,查看主从信息如下:
Error_code: 1594
 
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 172.21.101.10
Master_User: repl
Master_Port: 3307
Connect_Retry: 60
Master_Log_File: mysql-bin.039177
Read_Master_Log_Pos: 116425042
Relay_Log_File: relay-bin.002356
Relay_Log_Pos: 86299739
Relay_Master_Log_File: mysql-bin.039175
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB: mysql.%,information_schema.%
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: 86299576
Relay_Log_Space: 384592256
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: 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: 1380
Master_UUID: 5a25a829-f343-11e4-89f3-984be105150c
Master_Info_File: /mysqlData/up24/data/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: 170328 07:45:56
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
查看Error log :
 
2017-03-28 07:29:24 30851 [Note] Slave I/O thread: connected to master 'repl@172.21.101.10:3307',replication started in log 'mysql-bin.039175' at position 87578145
2017-03-28 07:29:24 30851 [Warning] Slave SQL: If a crash happens this configuration does not guarantee that the relay log info will be consistent, Error_code: 0
2017-03-28 07:29:24 30851 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.039175' at position 45009340, relay log './relay-bin.002356' position: 45009503
 
2017-03-28 07:29:47 30851 [ERROR] Error in Log_event::read_log_event(): 'read error', data_len: 8174, event_type: 32
2017-03-28 07:29:47 30851 [ERROR] Error reading relay log event: slave SQL thread aborted because of I/O error
2017-03-28 07:29:47 30851 [ERROR] Slave SQL: 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. Error_code: 1594
 
 
2017-03-28 07:29:47 30851 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.039175' position 86299576
 
解决方法:
根据errorlog的提示,重新设置主从
stop slave ;
change master to master_host='172.21.101.10',master_port=3307,master_user='repl',master_password='repl',master_log_file='mysql-bin.039175', master_log_pos=86299576;
 
start slave;
 
show slave status\G 查看状态:恢复正常
 
 
 
 
 

MySQL-Last_Errno: 1594的更多相关文章

  1. 机房断电导致MySQL同步1594错误

    1.错误信息 Last_IO_Error: Got fatal error from master when reading data from binary log: ' at 208645951. ...

  2. MySQL主从复制报错1594处理【转】

    一.问题描述 Mysql主从复制模式中,slave上报错 “relay log read failure”,导致主从同步停止. mysql> show slave status\G ****** ...

  3. MySQL主从报错1594

    一.主从报错 Relay log read failure 问题原因,MySQL主从使用的是kvm虚拟机,物理机超分严重,在负载高的情况下会kill掉占用资源最多的虚拟机,再启动后导致主从失败 mys ...

  4. mysql主从同步问题解决汇总

    出现问题原因:出现这个问题的原因是之前曾做过主从复制!问题:ERROR 1201 (HY000): Could not initialize master info structure; more e ...

  5. mysql主从同步错误解决和Slave_IO_Running: NO

    1.出现错误提示. Slave I/O: error connecting to master 'backup@192.168.1.x:3306' - retry-time: 60  retries: ...

  6. mysql主从备份及常见问题处理

    1.mysql主从备份基本原理 mysql支持单向.异步复制,复制过程中一个服务器充当主服务器,而一个或多个其它服务器充当从服务器.mysql复制基于主服务器在二进制日志中跟踪所有对数据库的更改(更新 ...

  7. 常见的MySQL Replication Error

    现在不少公司都在用MySQL(master)-->MySQL(slave)的框架,当然也有一主多从的架构,这也是MySQL主从的一个延伸架构;当然也有的公司MySQL主主的架构,MySQL主主架 ...

  8. Mysql主从(主从不同步解决办法,常见问题及解决办法,在线对mysql做主从复制)

    一.主从不同步解决办法 先上Master库: mysql>show processlist; 查看下进程是否Sleep太多.发现很正常. show master status; 也正常. mys ...

  9. mysql主从同步原理及错误解决

    mysql主从同步的原理: 1.在master上开启bin-log日志功能,记录更新.插入.删除的语句. 2.必须开启三个线程,主上开启io线程,从上开启io线程和sql线程. 3.从上io线程去连接 ...

随机推荐

  1. 下载Ubuntu镜像

    Ubuntu最新桌面版:http://www.ubuntu.org.cn/download/desktop Ubuntu历史版本下载,只需要更改链接后面的版本号:http://releases.ubu ...

  2. 为什么要使用自增ID作为主键

    1.从业务上来说 在设计数据库时不需要费尽心思去考虑设置哪个字段为主键.然后是这些字段只是理论上是唯一的,例如使用图书编号为主键,这个图书编号只是理论上来说是唯一的,但实践中可能会出现重复的 情况.所 ...

  3. [转]C#自定义控件属性与行为

    原文链接:http://blog.csdn.net/a237428367/article/details/5926445 控件应该定义属性而不是公共字段,因为可视化设计器在属性浏览器中显示属性,而不显 ...

  4. Scrapy命令和备注

    Scrapy命令和备注 1.创建一个新项目(命令行) project是项目名 scrapy startproject <project_name> 2.调试项目(pycharm) 在pyc ...

  5. angualar入门学习-- 自定义指令 指令编译执行过程

    3个阶段: 一.加载阶段 加载angular.js的源码,找到ng-app确定应用边界范围. 二.编译阶段 compile 查找所有指令,保存在一个列表中 对所有指令按优先级(property属性值) ...

  6. pro_select_roleinfo_p3

    DELIMITER | drop procedure if exists pro_select_roleinfo_p3; CREATE PROCEDURE pro_select_roleinfo_p3 ...

  7. 指定文件夹 指定文件后缀名 删除整个文件夹 git 冲突解决 create a new repository on the command line push an existing repository from the command line

    http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/001375840038939c2 ...

  8. vue-router 中 meta的用法

    vue-router中的meta,也就是类似于面包屑的功能 路由 代码 用这个获取 嗯,就酱~~ 参考链接:https://blog.csdn.net/qq_32963841/article/deta ...

  9. JavaScript教程1

    1.什么是 JavaScript? JavaScript 是一门跨平台.面向对象的动态的弱类型的轻量级解释型语言,是一种基于对象和事件驱动并具有相对安全性的客户端脚本语言.应用于 HTML 文档能够在 ...

  10. Linux(2)- linux目录结构、shell基本命令

    一.Linux之文档与目录结构 1.Linux文件系统结构 Linux目录结构的组织形式和Windows有很大的不同.Linux没有“盘(如C盘.D盘.E盘)”的概念,而是建立一个根"/&q ...