Updated on 2026-10-08 GMT+08:00

Forcing Rotation for Audit Logs

Scenarios

You can enable forcible rotation for audit logs. Once it is enabled, the system immediately generates audit logs and uploads them to OBS.

Prerequisites

Before forcing rotation for audit logs, you must enable SQL audit first.

Supported Database Versions

SQL audit can be enabled and integrated with LTS only in the following versions. If your DB engine version is too old, upgrade it to the latest version by referring to Upgrading a Minor Version.
  • RDS for MySQL 5.6 instances using cloud disk storage: 5.6.43 and later versions
  • RDS for MySQL 5.7 instances using cloud disk storage: SQL audit can be enabled only for 5.7.23 and later. To integrate audit logs with LTS after enabling SQL audit, the instance version must be 5.7.25 or later.
  • RDS for MySQL 8.0
  • RDS for MySQL 8.4

Constraints

  • This function can be enabled for primary instances and read replicas.
  • If there is not enough free backup space available for generated audit logs, the additional space used will be billed.
  • Audit logs are cleaned up every hour. If you change the retention period of audit logs, expired audit logs will be deleted 1 hour later.
  • If a standby node of the HA read replica is promoted to primary due to an exception in its primary node, the audit logs generated during the promotion are not visible.

Procedure

  1. Log in to the RDS console.
  2. Click in the upper left corner and select a region.
  3. On the Instances page, click the target instance name to go to the Summary page.
  4. In the navigation pane on the left, choose Logs. On the displayed page, click the SQL Audit Logs tab.
  5. Click Force Rotation. The system immediately generates audit logs and uploads them to OBS.

    Figure 1 Force Rotation