Got fatal error 1236 from master when reading data from binary log:’Could not find first log file name in binary log index file’ occurs in master-slave synchronization, it is caused by inconsistent master-slave log version numbers. The solution is as follows:
View the main log number MariaDB [(none)] > Flush logs; (At this time, the main server will recreate a binlog file;) MariaDB [(none)]> show master status; +------------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +------------------+----------+--------------+---- --------------+ | mysql-bin.000003 | 385 | | | +------------------+----------+--------------+---- --------------+ 1 row in set (0.000 sec) View the slave log file number from show slave status\G File :mysql-bin.000005 It was found that the master and slave log file numbers were different. Stop slave from it;
MariaDB [(none)]> change master to master_log_file ='dbmaster-bin.000005',master_log_pos=120;
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> start slave;
MariaDB [(none)]> show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 192.168.220.130 Master_User: test Master_Port: 3306 Connect_Retry: 60 Master_Log_File: mysql-bin.000003 Read_Master_Log_Pos: 385 Relay_Log_File: mysqld-relay-bin.000002 Relay_Log_Pos: 555 Relay_Master_Log_File: mysql-bin.000003 Slave_IO_Running: Yes Slave_SQL_Running: Yes
Similar Posts:
- mysql Slave_IO_Running:NO [How to Solve]
- How to Solve MYSQL ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
- [Solved] Last_IO_Error: error connecting to master ‘[email protected]:3306’ – retry-time: 60 …
- Obstacle Elimination set: Slave_ IO_ R unning:No And slave_ IO_ R unning:Connecting reason
- MySql Host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts…
- MySql Host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’ [How to Solve]
- [Solved] MySql Host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts…
- MySQL 5.7 error reporting from database 1032 [How to Solve]
- ERROR 3021 (HY000): This operation cannot be performed with a running slave io thread; run STOP SLAVE IO_THREAD FOR CHANNEL ” first.
- MySQL [ERROR] Table ‘mysql.user’ doesn’t exist