RDS Mysql not remove bin log

0

I have problem with mysql RDS instance, it have 2 replicas, and i set binlog is 48 hour, but seem it not clear binlog and now it take up 300GB data, i would like to ask for help what is the way to clean up binlog and what is it impact

Chris
asked 8 months ago663 views
1 Answer
0

The binary log is a set of log files that contain information about data modifications made to an MySQL server instance. The binary log contains information such as the following:

Events that describe database changes such as table creation or row modifications

Information about the duration of each statement that updated data

Events for statements that could have updated data but didn't

The binary log records statements that are sent during replication. It is also required for some recovery operations. For more information, see The Binary Log and Binary Log Overview in the MySQL documentation.

The automated backups feature determines whether binary logging is turned on or off for MySQL. You have the following options:

Turn binary logging on Set the backup retention period to a positive nonzero value.

Turn binary logging off Set the backup retention period to zero.

For more information, see Enabling automated backups.

To understand how to acces the MySQL binary logs take a look at the documentation

AWS
David C
answered 8 months ago
  • Hi David my issue is bin log didn't remove after a period of time, even i tried to reduce bin log retention to 1 hour but won't help, now bin log keep increase and disk space is almost full

  • Amazon RDS normally purges a binary log as soon as possible, but the binary log must still be available on the instance to be accessed by mysqlbinlog. To specify the number of hours for RDS to retain binary logs, use the mysql.rds_set_configuration stored procedure and specify a period with enough time for you to download the logs. After you set the retention period, monitor storage usage for the DB instance to ensure that the retained binary logs don't take up too much storage. The following example sets the retention period to 1 day. -- call mysql.rds_set_configuration('binlog retention hours', 24); To display the current setting, use the mysql.rds_show_configuration stored procedure. -- call mysql.rds_show_configuration;

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions