MySQL主从报错1594
一、主从报错 Relay log read failure
问题原因,MySQL主从使用的是kvm虚拟机,物理机超分严重,在负载高的情况下会kill掉占用资源最多的虚拟机,再启动后导致主从失败
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.0.8
Master_User: rsync
Master_Port: 3310
Connect_Retry: 60
Master_Log_File: mysql-bin.004772
Read_Master_Log_Pos: 850868066
Relay_Log_File: mysql-relay-bin.5326697
Relay_Log_Pos: 46202283
Relay_Master_Log_File: mysql-bin.004772
Slave_IO_Running: Yes
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: 516345810
Relay_Log_Space: 380726348
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: 1
1 row in set (0.00 sec)
二、解决方法
在show slave status\G中找到如下信息,或者查看relay-log.info文件:
Relay_Master_Log_File: mysql-bin.004772 # slave库已读取的master的binlog
Exec_Master_Log_Pos: 516345810 # 在slave上已经执行的position位置点 停掉slave,以slave已经读取的binlog文件,和已经执行的position为起点,重新设置同步。
mysql> stop slave;
Query OK, 0 rows affected (0.08 sec) mysql> change master to master_host='192.168.0.8', master_user='rsync',master_password='d25tgb33edc',master_port=3306,master_log_file='mysql-bin.004772',master_log_pos=516345810;
Query OK, 0 rows affected (1.03 sec) mysql> start slave;
Query OK, 0 rows affected (0.41 sec)
MySQL主从报错1594的更多相关文章
- MySQL主从复制报错1594处理【转】
一.问题描述 Mysql主从复制模式中,slave上报错 “relay log read failure”,导致主从同步停止. mysql> show slave status\G ****** ...
- MySQL主从报错解决:Failed to initialize the master info structure
大清早收到一个MySQL的自定义语言告警 :replication interrupt,看来是主从同步报错了. 登陆MySQL,执行 show slave status \G 发现salve已经停止了 ...
- Mysql 主从报错:1141
主从同步,从库报错代码:1141 ,错误信息如下: Master_Port: 3306 Connect_Retry: 60 Master_Log_File: binlog.000086 Read_Ma ...
- mysql主从报错截图
1.首先确认报错的binlog和last event. 2.然后去主的机器上查看该报错的内容和报错的的位置,如果是结尾报错的,可以直接从新的binlog进行同步. #/mysql/logs# ../b ...
- MySQL主从-报错
安装: 环境: 系统:centos7 x3 master:192.168.220.133 slave1:192.168.220.136 slave2:192.168.220.137 mysql服务器, ...
- 线上MYSQL同步报错故障处理总结(转)
前言 在发生故障切换后,经常遇到的问题就是同步报错,数据库很小的时候,dump完再导入很简单就处理好了,但线上的数据库都150G-200G,如果用单纯的这种方法,成本太高,故经过一段时间的摸索,总结了 ...
- python 3.5.2安装mysql驱动报错
python 3.5.2安装mysql驱动报错 python 3.5.2安装mysql驱动时出现如下异常: [root@localhost www]# pip install mysql-connec ...
- Loadrunner参数化连接oracle、mysql数据源报错及解决办法
Loadrunner参数化连接oracle.mysql数据源报错及解决办法 (本人系统是Win7 64, 两位小伙伴因为是默认安装lr,安装在 最终参数化的时候,出现连接字符串无法自动加载出来: 最 ...
- 连接mysql数据库报错java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized...解决方法
今天连接mysql数据库报错如下: java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or r ...
随机推荐
- VScode开发Vue项目,关闭eslint代码检查,以及相关配置
Vue初始化项目时如果不小心安装了js 语法检测 功能,撸码时一个空格不对就会各种报错 个人感觉这个语法检测功能很有点过于严格,用起来十分难受,所以果断关闭eslint,找到webpack.base. ...
- win7 win10双系统开机系统引导
以win7启动管理器引导作为启动引导 安装一个easybcd 然后里面添加引导选项(添加新条目---->编辑引导菜单(选择倒计时30秒)把use metro bootloader勾去掉就是默认的 ...
- Django商城项目笔记No.7用户部分-注册接口-判断用户名和手机号是否存在
Django商城项目笔记No.7用户部分-注册接口-判断用户名和手机号是否存在 判断用户名是否存在 后端视图代码实现,在users/view.py里编写如下代码 class UsernameCount ...
- 【Ansible 文档】【译文】Ad-Hoc 命令介绍
Introduction To Ad-Hoc Commands Ad-Hoc命令介绍 下面的例子展示了如何使用 /usr/bin/ansible 来运行ad hoc任务. 什么是ad hoc命令? 一 ...
- vue2.0学习笔记之路由(二)路由嵌套+动画
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- (一)SSO之CAS框架通俗原理
版权声明:本文为博主原创文章.转载请标明出处. https://blog.csdn.net/lovesummerforever/article/details/36068249 SSO统一验证 ...
- Kafka--基础知识
- Ethereum HD Wallet(虚拟货币钱包)-BIP32、BIP39、BIP44
1.使用HD钱包的好处(链接:https://www.jianshu.com/p/53405db83c16) 备份更容易 传统钱包的问题是一个钱包可能存有一堆密钥地址,每个地址都有一些比特币.这样备份 ...
- linux IP 命令使用举例(转)
ip 1.作用ip是iproute2软件包里面的一个强大的网络配置工具,它能够替代一些传统的网络管理工具,例如ifconfig.route等,使用权限为超级用户.几乎所有的Linux发行版本都支持该命 ...
- pyspider爬取数据导入mysql--1.安装驱动
接上篇,刚装好的pyspider,我们打算大显身手,抓一批数据到mysql中. 然而,出师未捷,提示我们:ImportError: No module named MySQLdb 这是因为还没有安装M ...