I have a backup server that replicates my production server's mysql database, awhile ago I setup a staging server with the same php script with the only difference being that I gave it a read only mysql user so it can't make changes to the database, and only read from it. I'm not sure if it had anything to do with this but today I saw the backup had stopped working and it has the following error:
Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position'
Here is the output from the maser:
File: mysql-bin.000208
Position: 24383202
Binlog_Do_DB: sexxymofo
Binlog_Ignore_DB:
and the slave:
Slave_IO_State:
Master_Host: 184.168.76.5
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000193
Read_Master_Log_Pos: 54442531
Relay_Log_File: mysqld-relay-bin.000155
Relay_Log_Pos: 54442676
Relay_Master_Log_File: mysql-bin.000193
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB: sexxymofo
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 54442531
Relay_Log_Space: 54442875
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
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: 'Client requested master to start replication from impossible position'
Last_SQL_Errno: 0
Last_SQL_Error:
as you can see the slave has got ahead of the master and into a non-existent position, can anyone help? I'm probably gonna restart the process but I would like to make sure it doesn't happen again.
Position is position within the file so the slave is way behind, on file mysql-bin.000193, and the master is already on mysql-bin.000208.
The impossible about this setup might be that the master has purged the file mysql-bin.000193 and since the slave isn't running IO that file hasn't been transferred.