主从同步失败
来源:5-2 mysql主从复制演示

宝慕林2132329
2020-02-02
从库同步总是出错,请大师帮我分析一下原因
主库
mysql> show master status\G;
*************************** 1. row ***************************
File: bin.000002
Position: 154
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set:
1 row in set (0.00 sec)
从库
mysql> change master to master_host=‘192.168.0.200’,master_user=‘rep’,master_password=‘123456’,master_log_file=‘mysql-bin.000002’,master_log_pos=154;
mysql> start slave
mysql> show slave status \G;
Master_SSL_Verify_Server_Cert: No
Slave_IO_Running: No
Slave_SQL_Running: Yes
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 binary log index file’
1回答
-
sqlercn
2020-02-02
主库上是不是已经把mysql-bin.000002这个文件删除了?重新做一次全备使用master-data=2记录当前的日志点,再恢复一下从库,然后用这个日志进行change master配置就可以了。
00
相似问题