Score:1

Need to keep each binlog files to 24 hrs

gi flag

We have a requirement werein we need to keep each binlog files(like mysql-bin-changelog.025249, mysql-bin-changelog.025250, mysql-bin-changelog.025251....) of MYSQL RDS to minimum 24 hrs.

However, i see that binlog files are getting purged/deleted after 10-12 mins.

Below is the current setup in my RDS parameter group-: 1.binlog retention hours is set to 24 hrs. 2.max_binlog_size is set to 134217728 3.binlog_expire_logs_seconds is set to 2592000.

Also, my MYSQL RDS database is heavily used and has 400+ tables.

Please let me know which parameter i need to change, so that each bin log should be retained for 24 hrs.

Score:1
gp flag
Tim

According to the AWS RDS documentation, you call a stored procedure to set the binary log retention

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

Here's some relevent information from the docs

The binlog retention hours parameter is used to specify the number of hours to retain binary log files. Amazon RDS normally purges a binary log as soon as possible, but the binary log might still be required for replication with a MySQL database external to Amazon RDS. The default value of binlog retention hours is NULL.

The binlog retention hours parameter is used to specify the number of hours to retain binary log files. Amazon RDS normally purges a binary log as soon as possible, but the binary log might still be required for replication with a MySQL database external to Amazon RDS. The default value of binlog retention hours is NULL.

...

For MySQL DB instances, the maximum binlog retention hours value is 168 (7 days).

After you set the retention period, monitor storage usage for the DB instance to make sure that the retained binary logs don't take up too much storage.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.