Client requested master to start replication from impossible position; the last event was read from
一:问题描述
由于10.0.3.96此虚拟机所在的物理机存储不够了,所以上面的数据库也无法访问了。
后来10.0.3.96可以正常访问后,其从库10.0.3.97却发生了异常:
mysql> show slave status \G;
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: 10.0.3.96
Master_User: admin
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000417
Read_Master_Log_Pos: 228308262
Relay_Log_File: vhost_eip_26-relay-bin.001024
Relay_Log_Pos: 228308408
Relay_Master_Log_File: mysql-bin.000417
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 228308262
Relay_Log_Space: 228308614
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: 1236
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the last event was read from './mysql-bin.000417' at 228308262, the last byte read was read from './mysql-bin.000417' at 4.'
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
1 row in set (0.01 sec)
ERROR:
No query specified
经查看,该binlog文件最后一个position是228287326,没有228308262这个位置:
# at 228287326
#170223 3:25:08 server id 1 end_log_pos 228287353 Xid = 1951871937
COMMIT/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
二:解决办法
从下一个文件mysql-bin.000418的起始位置开始复制。
mysql> stop slave;
Query OK, 0 rows affected (0.00 sec)
mysql> CHANGE MASTER TO MASTER_HOST ='10.0.3.96',MASTER_LOG_FILE ='mysql-bin.000418',MASTER_LOG_POS = 4;
Query OK, 0 rows affected (0.25 sec)
mysql> start slave;
Query OK, 0 rows affected (0.00 sec)
mysql> show slave status \G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 10.0.3.96
Master_User: admin
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000418
Read_Master_Log_Pos: 107
Relay_Log_File: vhost_eip_26-relay-bin.000002
Relay_Log_Pos: 253
Relay_Master_Log_File: mysql-bin.000418
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 107
Relay_Log_Space: 416
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: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
1 row in set (0.00 sec)
ERROR:
No query specified
---------------------
作者:雅冰石
来源:CSDN
原文:https://blog.csdn.net/yabingshi_tech/article/details/56841704
版权声明:本文为博主原创文章,转载请附上博文链接!
转载于:https://www.cnblogs.com/wuchangsoft/p/10375852.html
Client requested master to start replication from impossible position; the last event was read from相关推荐
- MySQL主从同步各类型故障总结
主从同步故障总结 错误一 [ERROR] Slave I/O: error connecting to master 'replication@VMS00782:3306' - retry-time: ...
- drbd heartbeat mysql_Heartbeat+DRBD+MySQL Replication故障处理
不久前的一次机房网络故障,再一次对我们在Heartbeat+DRBD+MySQL数据库架构运维水平的一个考验,之前不止一次的测试与线上部署,还有之后大言不惭的关于该架构组件的所谓深入理解,在这一次不经 ...
- mysql 错误码1236_【MySql】MySQL Replication Fatal Error 1236
环境:双M-M架构,其中一台B因为磁盘损坏,服务器异常重启.重启之后B上面的数据库正常运行,当时A 库报如下错误: Last_IO_Error: Got fatal error 1236 from m ...
- [ERROR] Slave I/O: error connecting to master
[size=small]刚配置的MySQL主从,在从机上看到 点击(此处)折叠或打开 mysql> SHOW slave STATUS \\G ************************* ...
- [原创]CentOS下Mysql双机互为备份
一.环境: 1.安装Centos-6.5-x64位系统的机器两台: host1:192.168.2.3 host2:192.168.2.4 (互相能ping通) 2.安装Mysql. 命令:Yum ...
- MySQL--从库启动复制报错1236
链接:http://blog.csdn.net/yumushui/article/details/42742461 今天在搭建一个MySQL master-slave集群时,执行了change mas ...
- mysql导入数据io异常_mysql 数据同步 出现Slave_IO_Running:No问题的解决方法小结
mysql replication 中slave机器上有两个关键的进程,死一个都不行,一个是slave_sql_running,一个是Slave_IO_Running,一个负责与主机的io通信,一个负 ...
- MySQL主从同步问题集
http://blog.chinaunix.net/uid-8786588-id-3771613.html 在InnoDB引擎下发现,Mysql的主从热备存在数据不一致的问题,一些数据没有成功同步到备 ...
- MySQL主从失败 错误Got fatal error 1236
刚洗完澡准备睡觉,同事给我打电话说团购数据库主从不同步了,尼玛,咋就这么苦逼呢,好吧,速度开电脑拨×××解决. 1.登录从库查看主从同步状态,确实是否不同步 1 2 3 4 5 6 7 8 9 10 ...
最新文章
- Typedef用法(转载)
- 特征层次分析、视觉特征语义探索(微调+预训练)
- jdbc oracle存储过程,java jdbc 执行oracle存储过程
- 数学与算法《文档相似性 - 余弦定理》
- linux 时间同步的2种方法(转)
- Redhat或者Centos 手动安装htop
- 如何自学计算机前端开发?精细的自学步骤是什么样的?
- fpga驱动oled iic显示代码_Arduino提高篇02—OLED屏汉字显示
- AI 框架部署方案之模型转换
- c语言:8、makeFile编写
- php集成环境安装包比较,PHP集成环境phpStudy安装包分享
- Responses 部分 | Http Header
- 类名+单书名号——泛型,什么是泛型?如何使用泛型
- 加一(python)
- 最简单的无线充电传输电路
- 南柯33的Python学习笔记第(一)部分
- HDevelop实现图片中局部图形识别标记
- HMM详细讲解与代码的实现
- 2023ACP世界大赛-AI时代下,艺术教育者论坛
- 为了给YiYi节省时间,写了个能自动拼图贴水印的机器人,很多bug,能用就行。...