Solved : Last_IO_Error: Got fatal error 1236 from master when reading data from binary log

Backing up the any Configuration item is something that you need to do utmost carefully. We do maridb replication. The replication stopped working one day. To solve the situation, we'll do the following.
 Error:
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position





Solution:


1. Check the LogPosition and File from master Server.

MariaDB [zabbix]> show master status;
+--------------------+-----------+--------------+------------------+
| File               | Position  | Binlog_Do_DB | Binlog_Ignore_DB |
+--------------------+-----------+--------------+------------------+
| mariadb-bin.001425 | 100058217 | zabbix       |                  |
+--------------------+-----------+--------------+------------------+
2. Stop Slave
MariaDB [zabbix]> STOP SLAVE;
Query OK, 0 rows affected (0.02 sec)

3. Now Change the Log File name.
MariaDB [zabbix]> CHANGE MASTER TO MASTER_LOG_FILE='mariadb-bin.001425', MASTER_LOG_POS=106602730;
Query OK, 0 rows affected (0.03 sec)

4. start slave.
MariaDB [zabbix]> START SLAVE;
Query OK, 0 rows affected (0.00 sec)
5. Check the status.

MariaDB [zabbix]> show slave status\G;
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: 192.168.1.2
                  Master_User: slave_user
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mariadb-bin.001425
          Read_Master_Log_Pos: 126214545
               Relay_Log_File: master-relay-bin.000002
                Relay_Log_Pos: 53776
        Relay_Master_Log_File: mariadb-bin.001425
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes

0 Comments