Mysql – default MySQL binlog retention in AWS RDS

amazon-rdslogMySQLmysql-5.6

I tried to retrieve my MySQL RDS binlogs in order to run manual "rollback" for some SQLs.
Unfortunately, I noticed that only 2 binlogs for the last 30 minutes are available.

"call mysql.rds_show_configuration" provides "binlog retention hours | NULL".

I guess (because RDS provides ability to point-in-time restore between daily backups) that AWS RDS keeps its binlogs for 24 hours. But it seems that it's unavailable for the end user…

TIA,
Vitay

Best Answer

you need to give it a value if you wish to preserve the binlogs:

call mysql.rds_set_configuration('binlog retention hours', 24);

will cause the binlogs to be stored for 24hrs, for example.