(转)主从同步遇到 Got fatal error 1236 from master when reading data from binary log: 'Could not find first log...

首先遇到这个是因为binlog位置索引处的问题,不要reset slave;

reset slave会将主从同步的文件以及位置恢复到初始状态,一开始没有数据还好,有数据的话,相当于重新开始同步,可能会出现一些问题;

一般做主从同步,都是要求以后的数据实现主从同步,而对于旧的数据完全可以使用数据库同步工具先将数据库同步,完了再进行主从同步;

好了遇到上面的问题,正确做法是:

1.打开主服务器,进入mysql

2.执行flush logs;//这时主服务器会重新创建一个binlog文件;

3.在主服务上执行show master slave \G;显示如下:

4.来到从服务器的mysql;

5.stop slave;

6.change master to master_log_file=‘mysql-bin.000012‘,master_log_pos=154;//这里的file和pos都是上面主服务器master显示的。

7.start slave;//这时候就应可以了

8.show slave status \G;//结果如下:

转载于:https://www.cnblogs.com/maodoudou/p/11217202.html

(转)主从同步遇到 Got fatal error 1236 from master when reading data from binary log: 'Could not find first log...

原文地址:https://www.cnblogs.com/Cong0ks/p/12242904.html

时间: 2024-11-08 11:54:22

(转)主从同步遇到 Got fatal error 1236 from master when reading data from binary log: 'Could not find first log...的相关文章

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 *************************** 1. row ***************************                Slave_IO_State:                   Master_Host: 88.88.88.88                   Master_User: replicate

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从库查看主从同步状态 1 mysql> show slave status\G; 2 *************************** 1. row *************************** 3 Slave_IO_State: 4 Master_Host: 101.200.*.* 5 Master_User: backup 6 Master_Port: 3306 7 Connect_Retry: 60 8 Master_

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 slave后,会清除复制相关的所有信息,包括:master.info, relay-log.info, 及无条件删除所有的中继日志(relay logs). 注意是无条件的,也就是不管理你Slave SQL线程是否把所有的relay log重放完了. 3. 注意,stop slave后,先保存show s

Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position'

[[email protected] bin]# mysqlbinlog logbin.000002 /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @[email protected]@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 4 #150511 20:57:36 server id 1 end_log_pos 106 Start:

Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'系列一:

主库添加log-bin-index 参数后,从库报这个错误: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 next 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'

mysql> show slave status \G Slave_IO_Running: No Slave_SQL_Running: Yes 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: 'Could not find first log file name in bi

mysql主从同步失败Last_IO_Error: Got fatal error 1236 from master解决方法

mysql教程主从同步失败Last_IO_Error: Got fatal error 1236 from master解决方法 遇到这样的错误如:“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'”等或由于清数据导致主从库不同步了,解决办法如下: 先进入sl

mysql主从同步失败Last_IO_Error: Got fatal error 1236 from master解决方法

mysql教程主从同步失败Last_IO_Error: Got fatal error 1236 from master解决方法 遇到这样的错误如:“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'”等或由于清数据导致主从库不同步了,解决办法如下: 先进入sl

MySQL主从失败 错误Got fatal error 1236解决方法

由于mysql主服务器异外重启, 导致slave maysql server报错, 错误如下:查看从伺服器错误:mysql> show slave status\G;Master_Log_File: mysql-bin.000288Read_Master_Log_Pos: 627806304Relay_Log_File: mysql-relay-bin.000990Relay_Log_Pos: 627806457Relay_Master_Log_File: mysql-bin.000288Sla