Relay log read failure
早上接到值班员的电话 说mysql 不同步了。
经查看发现机器早山无故断电了。
[root@twin14372 data]# uptime07:54:00 up 38 min, 1 user, load average: 0.00, 0.01, 0.15
机房一天机器突然断电,导致slave损坏,报错如下:
[root@twin14372 ~]# mysql -u root -pb5fdb71d -e "show slave status\G"
*************************** 1. row ***************************Slave_IO_State: Waiting for master to send eventMaster_Host: 123.150.185.190Master_User: slaveMaster_Port: 3306Connect_Retry: 60Master_Log_File: mysql-bin.000393Read_Master_Log_Pos: 252376610Relay_Log_File: relay-bin.000468Relay_Log_Pos: 189083515Relay_Master_Log_File: mysql-bin.000393Slave_IO_Running: YesSlave_SQL_Running: NoReplicate_Do_DB:Replicate_Ignore_DB:Replicate_Do_Table:Replicate_Ignore_Table:Replicate_Wild_Do_Table:Replicate_Wild_Ignore_Table:Last_Errno: 1594Last_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: 0Exec_Master_Log_Pos: 180112968Relay_Log_Space: 264877714Until_Condition: NoneUntil_Log_File:Until_Log_Pos: 0Master_SSL_Allowed: NoMaster_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: NoLast_IO_Errno: 0Last_IO_Error:Last_SQL_Errno: 1594Last_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.
值得注意:
Master_Log_File: mysql-bin.000393
Read_Master_Log_Pos: 252376610
Relay_Log_File: relay-bin.000468
Relay_Log_Pos: 189083515
Relay_Master_Log_File: mysql-bin.000393
………………………………
Exec_Master_Log_Pos: 180112968
Relay_Log_Space: 264877714
Until_Condition: None
记住红色标记的地方:
Master_Log_File: mysql-bin.000393
Exec_Master_Log_Pos: 180112968
解决办法:
mysql> stop slave;
Query OK, 0 rows affected (0.00 sec)
mysql> CHANGE MASTER TO MASTER_HOST='123.150.185.190', MASTER_PORT=3306, MASTER_USER='slave', MASTER_PASSWORD='b5fdb71d', MASTER_LOG_FILE='mysql-bin.000393', MASTER_LOG_POS=180112968;
Query OK, 0 rows affected (0.09 sec)
mysql> start slave;
Query OK, 0 rows affected (0.00 sec)
ok了slave正常运行了
mysql> show slave status\G
*************************** 1. row ***************************Slave_IO_State: Waiting for master to send eventMaster_Host: 123.150.185.190Master_User: slaveMaster_Port: 3306Connect_Retry: 60Master_Log_File: mysql-bin.000394Read_Master_Log_Pos: 13922311Relay_Log_File: relay-bin.000004Relay_Log_Pos: 14615799Relay_Master_Log_File: mysql-bin.000394Slave_IO_Running: YesSlave_SQL_Running: YesReplicate_Do_DB:Replicate_Ignore_DB:Replicate_Do_Table:Replicate_Ignore_Table:Replicate_Wild_Do_Table:Replicate_Wild_Ignore_Table:Last_Errno: 0Last_Error:Skip_Counter: 0Exec_Master_Log_Pos: 13922311Relay_Log_Space: 14615991Until_Condition: NoneUntil_Log_File:Until_Log_Pos: 0Master_SSL_Allowed: NoMaster_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: NoLast_IO_Errno: 0Last_IO_Error:Last_SQL_Errno: 0Last_SQL_Error:
1 row in set (0.00 sec)
转载于:https://blog.51cto.com/netspace/1308339
Relay log read failure相关推荐
- Last_Error: Relay log read failure: Could not parse relay log event entry.
综合网上各种答案,总结一下,还是有帮助的. Relay log corruption example: You can get error info after SHOW SLAVE STATUS; ...
- 解决Mysql复制Relay log read failure 的问题
一.问题描述 Mysql主从复制模式中,slave上报错 "relay log read failure",导致主从同步停止. mysql> show slave statu ...
- 一次从库 Relay log read failure故障
文章目录 1. 故障现象 2. 故障原因 3. 安装步骤 参考文档 1. 故障现象 任务需要搭建一个一主一从的环境.本人比较菜鸡,这个任务就交给我了.从库系统centos6.8,系统自带了mysql. ...
- mysql 主库down机_MySQL从库服务器down机报错Could not parse relay log event entry
环境介绍: 最近网站总是出问题,因为play服务总是跑着跑着就死了,于是经理尝试把play跑在我的MySQL这两台服务器上(因为这两台服务器的资源很空闲),可是没想到才跑了半天,就把服务器的128G内 ...
- 安装MHA中清理Relay log报错
安装MHA中清理Relay log报错 [root@MHA3 ~]# /usr/bin/purge_relay_logs --user=root --password=123456 -disable ...
- 使用purge_relay_logs 清理relay log
MySQL数据库主从复制在缺省情况下从库的relay logs会在SQL线程执行完毕后被自动删除,(默认relay_log_purge=1)但是对于MHA场景下,对于某些滞后从库的恢复依赖于其他从库的 ...
- mysql relay_技术分享 | MySQL:产生大量小 relay log 的故障一例
作者:高鹏 文章末尾有他著作的<深入理解 MySQL 主从原理 32 讲>,深入透彻理解 MySQL 主从,GTID 相关技术知识. 源码版本:5.7.22 水平有限,如有误请谅解 本文建 ...
- MySQL relay log 详细参数解释
前言:MySQL进行主主复制或主从复制的时候会在home目录下面产生相应的relay log,本文档总结这些相关参数的定义及解释. 1.什么是relay log The relay log, like ...
- mysql relay log 配置_mysql relay log参数汇总
前言:MySQL进行主主复制或主从复制的时候会在配置文件制定的目录下面产生相应的relay log,本文档总结这些相关参数的定义及解释. 1.什么是relay log The relay log, l ...
- 关于Relay Log无法自动删除的问题
本博客已经迁移至: http://cenalulu.github.io/ 本篇博文已经迁移,阅读完整的文章请点击: http://cenalulu.github.io/mysql/cannot-rot ...
最新文章
- android 图片加载库 Glide 的使用介绍
- java设置窗口不可移动_Java – JDialog不可移动
- egg.js java 生产数据_Egg 2.15.0 发布,阿里开源的企业级 Node.js 框架
- 程序控制发送文件到邮箱_Kindle电子邮箱推送
- 排序算法_HeapSort
- Mac上emacs标记快捷键
- WCF消息传输的几个基本概念(知识点整理)
- 日企人力资源规章制度汇总
- [游戏杂谈]浅谈单机游戏制作人到底应该具备什么样的能力
- msl3等级烘烤时间_MSL等级说明
- 如何在 7 分钟内黑掉 40 家网站?
- arm linux vi键盘错乱,Ubuntu Server 18.04安装后vi命令解决键盘错乱方法和wifi连接之后不能上网...
- Akka and Actors
- wgs84 转百度地图坐标
- 华为Mate40/华为Mate40Pro忘记密码怎么解锁激活手机设备已锁定恢复出厂无法解锁账户ID屏幕锁解除刷机方法教程
- 购物网站的推荐算法-个性化推荐算法中如何处理买了还推
- vb.net 教程 7-1 本地网络信息的获取 3 网络连接信息
- Rar5.20 key
- Es6箭头函数详细用法
- MT6735手动修改屏幕分辨率