现象:

mysql> show slave status\G;

*************************** 1. row ***************************

-------------------------------------------------

Master_Log_File: mysql-bin.000191

Read_Master_Log_Pos: 334164088

Relay_Log_File: mysql-srelay.000533

Relay_Log_Pos: 902042386

Relay_Master_Log_File: mysql-bin.000190

Slave_IO_Running: Yes

Slave_SQL_Running: NoReplicate_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.

error_log如下:

160519 18:42:21 [ERROR] Error reading relay log event: Could not open log file

160519 18:42:21 [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 abl

e to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Error_code: 1594

160519 18:42:21 [ERROR] Slave (additional info): File '/data/mysql3307/logs/mysql-srelay.030613' not found (Errcode: 2) Error_code: 29

160519 18:42:21 [Warning] Slave: File '/data/mysql3307/logs/mysql-srelay.030613' not found (Errcode: 2) Error_code: 29

160519 18:42:21 [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.009095' position 1069989357

解析:

从日志我们看出可能是master或者slave的binlog损坏或者网络问题

但是网络测过是正常的

然后stop slave,发现主库上的binlog继续增加,且没产生error_log

由此怀疑从库中继binlog损害

解决:

既然找出了原因,解决就相对容易了

1.从库执行reset slave,清除掉binlog日志

2.从出错前的位置开始启动复制

本例的复制位置为:

'mysql-bin.009095' position 1069989357

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

mysql 1594_【MySQL】复制1594错误(从库relaylog损坏)相关推荐

  1. mysql数据库基于gtid复制,mysql基于gtid复制的错误解决

    1.错误描述 Last_SQL_Errno: 1032 Last_SQL_Error: Coordinator stopped because there were error(s) in the w ...

  2. mysql主从1594错误_3分钟解决MySQL主从1594错误

    3分钟解决MySQL主从1594错误简介 Part1:写在最前 1594这个错误看起来挺严重的,会提示你binlog文件或者Relay log损坏了,例如binary log is corrupted ...

  3. MySQL一主二从复制环境切换主从库

    假设有一个一主二从的环境,当主库M出现故障时,需要将其中一个从库S1切换为主库,同时将S2指向新的主库S1,如果可能,需要将故障的主库M修复并重置为新的从库. 搭建一主二从复制环境可参考:MySQL搭 ...

  4. mysql filter_MySQL 过滤复制+复制映射 配置方法

    场景 node1 和 node2 为两台不同业务的MySQL服务器. 业务方有个需求,需要将node1上的 employees库的departments .dept_manager 这2张表同步到 n ...

  5. 【转载】mysql主键的缺少导致备库hang

    最近线上频繁的出现slave延时的情况,经排查发现为用户在删除数据的时候,由于表主键的主键的缺少,同时删除条件没有索引,或或者删除的条件过滤性极差,导致slave出现hang住,严重的影响了生产环境的 ...

  6. 涂抹mysql笔记-mysql复制特性

    涂抹mysql笔记-mysql复制特性 mysql复制特性:既可以实现整个服务(all databases)级别的复制,也可以只复制某个数据库或某个数据库中的某个指定的表对象.即可以实现A复制到B(主 ...

  7. linux mysql主主复制_MySQL主从复制与主主复制

    1.简介 MySQL作为世界上使用最为广泛的数据库之一,免费是其原因之一.但不可忽略的是它本身的功能的确很强大.随着技术的发展,在实际的生产环境中,由单台MySQL数据库服务器不能满足实际的需求.此时 ...

  8. mysql errno : 1146_MySQL_MySQL复制出错 Last_SQL_Errno:1146的解决方法,背景:我们在做数据迁移或者 - phpStudy...

    MySQL复制出错 Last_SQL_Errno:1146的解决方法 背景:我们在做数据迁移或者拆分的时候,使用Tablespace transcation 这种解决方案时,很有可能就会遇到 从库复制 ...

  9. MySQL主备复制原理、实现及异常处理

    欢迎支持笔者新作:<深入理解Kafka:核心设计与实践原理>和<RabbitMQ实战指南>,同时欢迎关注笔者的微信公众号:朱小厮的博客. 欢迎跳转到本文的原文链接:https: ...

最新文章

  1. java操作跨页的word cell,“excle如何打印不出现断行“EXCEL中,如何不跨页断行打印或显示,谢谢...
  2. 傅里叶频域,复数域,冲激函数,香农采样(不介绍公式-只介绍是啥)另一种思维
  3. python之turtle库(画图)
  4. boost::geometry::index::intersects用法的测试程序
  5. python ipaddress_Python3标准库:ipaddress Internet地址
  6. java输出栈的弹出序列_剑指offer:栈的压入、弹出序列(Java)
  7. bash 的相关配置
  8. python 输出 GPU内存 最大使用率
  9. 【编撰】linux IPC 001 - 概述
  10. 让DEM数据更有表现力
  11. Android笔记 theme主题
  12. 【Java】进制转换器的实现
  13. cor软件免费下载_CDRX4软件免费版
  14. [ArcGIS] 模型构造器中使用重分类 ArcPy与Numpy 相等间隔重分类
  15. 基于联合非负矩阵分解的多视角聚类学习笔记
  16. 计算机信息网络安全保护管理条例,中华人民共和国计算机信息系统安全保护条例...
  17. 【言简意赅】聊聊DAS、NAS、SAN三种存储方式
  18. 2021年秋招面经:上海禾赛提前批(FPGA设计)
  19. php 属猪,属猪人的流年运程
  20. 中关村软件园与百度飞桨启动AI人才培养计划:AI发展,人才先行

热门文章

  1. Nginx出现“413 Request Entity Too Large”错误解决方法
  2. struts2注解(转)
  3. 分布式系统设计注意点
  4. Mahout分布式推荐引擎介绍
  5. 批量导入LYNC 2010用户的联系人
  6. 流氓软件彻底免疫程序 v2.2 绿色版
  7. 查看ngnix使用的php.ini位置_修改Nginx php.ini文件的经典教程
  8. mysql.server 文件是什么_mysql的启动脚本mysql.server及示例配置文件
  9. c语言结构体如何定义字母,c语言中定义结构体如何定义?
  10. 西电计算机组装实验报告,西电模电实验报告(共7篇).docx