mysql从库Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'报错处理
年后回来查看mysql运行状况与备份情况,登录mysql从库查看主从同步状态
mysql> show slave status\G;
*************************** . row ***************************
Slave_IO_State:
Master_Host: 101.200.*.*
Master_User: backup
Master_Port:
Connect_Retry:
Master_Log_File: master-bin.
Read_Master_Log_Pos:
Relay_Log_File: mysql-relay.
Relay_Log_Pos:
Relay_Master_Log_File: master-bin.
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:
Last_Error:
Skip_Counter:
Exec_Master_Log_Pos:
Relay_Log_Space:
Until_Condition: None
Until_Log_File:
Until_Log_Pos:
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:
Last_IO_Error: Got fatal error from master when reading data from binary log: 'Could not find first log file name in binary log index file'
Last_SQL_Errno:
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id:
Master_UUID: e4a43da7-5b58-11e5-a12f-00163e003632
Master_Info_File: /home/data/mysql/master.info
SQL_Delay:
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count:
Master_Bind:
Last_IO_Error_Timestamp: ::
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position:
row in set (0.00 sec) ERROR:
No query specified
突然之间Slave_IO_Running: 状态变成NO了
解决方法。
首先在从库上执行
stop slave;
查看主库master状态
mysql> show master status\G;
*************************** . row ***************************
File: mysql-bin.
Position:
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set:
row in set (0.00 sec) ERROR:
No query specified mysql> flush logs;
Query OK, rows affected (0.11 sec)
刷新binlog日志
flush logs;
刷新后的日志会+1
例如上面的 File: mysql-bin.000113 会变成 File: mysql-bin.000114
再次查看master状态
mysql> show master status\G;
*************************** . row ***************************
File: mysql-bin.
Position:
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set:
row in set (0.00 sec) ERROR:
No query specified
然后就不需要在操作master,切换到从库
输入CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000114',MASTER_LOG_POS=120;
执行start slave;
查看从库状态
mysql> show slave status\G;
*************************** . row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 101.200.*.*
Master_User: backup
Master_Port:
Connect_Retry:
Master_Log_File: mysql-bin.
Read_Master_Log_Pos:
Relay_Log_File: mysql-relay.
Relay_Log_Pos:
Relay_Master_Log_File: mysql-bin.
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:
Last_Error:
Skip_Counter:
Exec_Master_Log_Pos:
Relay_Log_Space:
Until_Condition: None
Until_Log_File:
Until_Log_Pos:
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master:
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno:
Last_IO_Error:
Last_SQL_Errno:
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id:
Master_UUID: e4a43da7-5b58-11e5-a12f-00163e003632
Master_Info_File: /home/data/mysql/master.info
SQL_Delay:
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count:
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position:
row in set (0.00 sec) ERROR:
No query specified
mysql从库Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'报错处理的更多相关文章
- MySQL案例09:Last_IO_Error: Got fatal error 1236 from master when reading data from binary log
刚处理完“挖矿”事件,在做最后一个MySQL NBU备份的时候,发现从库有问题,好奇的是怎么主从状态异常没有告警呢?先不管这么多了,处理了这个问题再完善告警内容. 一.错误信息 从库show slav ...
- 【MySQL】MySQL同步报错-> Last_IO_Error: Got fatal error 1236 from master when reading data from binary log
这个报错网上搜索了一下,大部分是由于MySQL意外关闭或强制重启造成的binlog文件事务点读取异常造成的主从同步报错 Last_IO_Error: Got fatal error 1236 from ...
- Last_IO_Errno: 1236 Last_IO_Error: Got fatal error 1236 from master when reading data from binary lo
mysql> show slave status\G *************************** 1. row *************************** ...
- mysql 主从 Got fatal error 1236 from master when reading data from binary log: 'Could not find first 错误
本地MySQL环境,是两台MySQL做M-M复制.今天发现错误信息: mysql 5.5.28-log> show slave status\G ************************ ...
- Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'
setup slave from backup i got error Got fatal error 1236 from master when reading data from binary l ...
- Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'系列一:
从库报这个错误:Got fatal error 1236 from master when reading data from binary log: 'Could not find first lo ...
- Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'系列三:重置主从同步
1:停止slave服务器的主从同步 stop slave; 2:对Master数据库加锁 flush tables with read lock; 3:备份Master上的数据 mysqldump - ...
- Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'系列二:reset slave
reset slave会清除从库的所有复制信息.一般应用场景:如切换为不同的Master, 主从重做等: 1. 命令在slave上执行,执行前一定要stop slave. 2. 执行reset sla ...
- 主从同步遇到 Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'时怎么解决
首先遇到这个是因为binlog位置索引处的问题,不要reset slave: reset slave会将主从同步的文件以及位置恢复到初始状态,一开始没有数据还好,有数据的话,相当于重新开始同步,可能会 ...
随机推荐
- 恋爱Linux(Fedora20)1——安装开启ssh服务
1) 安装openssh-server # yum install openssh-server 2) 查看是否已成功安装openssh-server # rpm -qa | grep openssh ...
- JavaScript对象之深度克隆
也不知道从什么时候开始,前端圈冒出了个新词:对象深度克隆.看起来好像很高大上的样子,实际上并不新鲜,在我们的实际项目开发中,你可能早已用到,只不过由于汉字的博大精深,有些原本很简单的事物被一些看似专业 ...
- Reactor模型-多线程程版
1.概述 在Reactor单线程版本的设计中,I/O任务乃至业务逻辑都由Reactor线程来完成,这无疑增加了Reactor线程的负担,高负载情况下必然会出现性能瓶颈.此外,对于多处理器的服务器来说, ...
- Laravel Cache 的缓存文件在到期后是否会自动删除
验证缓存文件是否会自动删除的目的是,防止产生大量的缓存文件,占满磁盘.因为,我最近越来越多的使用 cache 来缓存各类 token. 使用的是 file 作为 CACHE_DRIVER CACHE_ ...
- poj2528贴海报,,
对于区间段的离散化需要注意一下,和点离散化不同 离散后如何识别一段区间还是一段区间,而不是两个顶点,就是如果两个点的距离大于1,就往离散的数据里插入一个中间值,即用三个点来表示一段区间 /* 离散化长 ...
- python+selenium五:多窗口切换与获取句柄
from selenium import webdriverfrom selenium.webdriver.common.by import Byimport time driver = webdri ...
- bootstrap之表单和图片
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Ext.js项目(二)
人事管理模块: 1.机构管理 2.部门管理 3.人员管理 一:用例图
- 异构平台同步(mysql-->oracle)
https://www.cnblogs.com/andy6/p/6159060.html
- JS高级 - 面向对象2(prototype定义)
定义和用法 prototype 属性允许您向对象添加属性和方法 注意: Prototype 是全局属性,适用于所有的Javascript对象. 语法 object.prototype.name=val ...