教程集 www.jiaochengji.com
教程集 >  数据库  >  mysql  >  正文 Mysql主从库不同步1236错误:could not find first log file name in binary...

Mysql主从库不同步1236错误:could not find first log file name in binary...

发布时间:2023-04-29   编辑:jiaochengji.com
教程集为您提供Mysql主从库不同步1236错误:could not find first log file name in binary...等资源,欢迎您收藏本站,我们将为您提供最新的Mysql主从库不同步1236错误:could not find first log file name in binary...资源
Mysql主从库不同步1236错误:could not find first log file name in binary log index file错误是主从的一个日志问题,我们只要简单的配置一下即可解决 


近日,遇到了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'

解决办法:

1. 首先停止从库同步;

slave stop;

2. 主库中清空日志:

flush logs;


3. 查看主库状态,主要查看日志文件和位置:

show master status;

4. 回到从库中,执行命令,使日志文件和位置对应主库:

CHANGE MASTER TO MASTER_LOG_FILE='log-bin.000005',MASTER_LOG_POS=107;

5. 最后,启动从库:

slave start;

成功解决!
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'”

您可能感兴趣的文章:

[关闭]
~ ~