Updated on 2023-11-03 GMT+08:00

RDS for MySQL Binlog Issues

Scenario 1

The binlog retention period was set to 7 days for an RDS for MySQL instance. A binlog was generated every 5 minutes. The actual data volume was not the same as expected.

Cause analysis:

After a DB instance is created, a full backup is generated automatically and a binlog is generated every 5 minutes.

If there are no data changes, no binlog is generated.

Scenario 2

The service volume remained almost unchanged, but the storage usage of generated binlogs increased greatly.

Cause analysis:

RDS for MySQL binlogs are row-based, so the entire rows of data before and after the modification are recorded.

Suppose that there is a table containing a column with much data and you perform an update operation on certain data except those in that column. But binlogs completely record the data of the whole rows before and after the update operation. As a result, the storage usage of binlogs increases.