Overview
This article describes how to enable Binlog in PolarDB MySQL 5.6 and 8.0 and how to configure the retention period for binlogs.
Detail
Alibaba Cloud reminds you that:
- Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
- You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
- If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.
Enable Binlog
The loose_polar_log_bin parameter is required for both apsaradb RDS for MySQL 5.6 and 8.0 when the Binlog feature is enabled. For more information, see enable Binlog.
Note:
- Version 5.6: set loose_polar_log_bin to ON_WITH_GTID.
- In MongoDB 8.0, set loose_polar_log_bin to ON.
- If the Binlog feature is disabled in OSS v5.6 or v8.0, set the loose_polar_log_bin to OFF.
Configure the retention time for binlogs
By default, binlogs are retained for two weeks. If you want to modify the retention time, you must adjust the retention parameters of binlogs.
Application scope
- PolarDB