In this blog post, we’ll discuss some of the options available when purging binary logs. We’ll look at how to safely purge them when you have slaves in your topology and want to avoid deleting any binary log that still needs to be applied.
We generally want to ensure that, before purging the binary logs from the master, all logs were applied to the slaves to avoid halting them. The example error below is a classic case of a binary log purged before being applied on the slave:
Last_IO_Errno: 1236
Last_IO_Error: Got fatal error 1236 from master when reading data
from binary log: ‘Could not open log file’
MySQL offers some options to purge of binary logs. One of them is
executing the PURGE BINARY LOGS command.
The …