故障现象  :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. Django Admin后台管理模块的使用

    Admin后台管理模块的使用 Django的管理员模块是Django的标准库django.contrib的一部分.这个包还包括其它一些实用的模块: django.contrib.auth django ...

  2. socket.io 中文api

    1. 服务端 io.on('connection',function(socket)); 监听客户端连接,回调函数会传递本次连接的socket io.sockets.emit('String',dat ...

  3. SQL系统函数——系统信息

    1.查看信息1.1.查看编号和名称select @@SERVERNAME--SQL SERVER服务器的连接字符串,如:computername\instancenameselect @@SERVIC ...

  4. JZOJ.5231【NOIP2017模拟8.5】序列问题

    Description   Input 输入文件名为seq.in.首先输入n.接下来输入n个数,描述序列 A. Output 输出文件名为seq.out.输出一行一个整数代表答案.   Sample ...

  5. iOS 将金钱变为逗号形式

    ; NSNumberFormatter * formatter = [NSNumberFormatter new]; [formatter setNumberStyle:NSNumberFormatt ...

  6. 转义字符的理解(JAVA、字符串和正则表达式)

    一.原理总结: 要理解转义,首先要从正则表达式说起. 在正则表达式中:*和\是特殊字符:为了匹配这两个字符本身,正则表达式中需要写为\*和\\ 在Java中,只能用字符串表示正则表达式,所以需要把\* ...

  7. mysql中修改字段的类型

    修改表字段的类型: ALTER TABLE 表名  MODIFY COLUMN 字段名 字段类型定义 如:将movie_mark修改为浮点型 alter table new_playing_video ...

  8. JAVA源码之JDK(三)——String、StringBuffer、StrinBuilder

    Java中,除了8种基本类型,最长用的应该就是String类了.那么我们来看看JDK中的源码是怎么建造String.StringBuffer.StrinBuilder一系列类的. java.lang. ...

  9. 什么是Python?Python的设计哲学?如何获取/升级Python?

    Python? Python(英国发音:/ˈpaɪθən/ 美国发音:/ˈpaɪθɑːn/) Python的创始人为吉多·范罗苏姆(Guido van Rossum). 1989年的圣诞节期间,吉多· ...

  10. Ubuntu 14.04下安装GitLab

    0.硬件要求 官方要求:http://doc.gitlab.com/ce/install/requirements.html CPU 1 core works supports up to 100 u ...