How Do I Change the Binlog Retention Period?
GaussDB(for MySQL) is compatible with the binlog_expire_logs_seconds parameter of community version 8.0. You can change binlog retention period using this parameter.
Procedure
- Log in to the management console.
- Click in the upper left corner and select a region and a project.
- Click in the upper left corner of the page, choose .
- On the Instances page, click the instance name to go to the Basic Information page.
- In the navigation pane on the left, choose Parameters. On the Parameters tab, search for the parameter log-bin and change its value to ON (indicating that binlog is enabled).
- On the Parameters tab, configure binlog_expire_logs_seconds.
- When a new binlog file is generated, any existing binlog files that have expired will be deleted.
- If no new binlog file is generated, historical binlog files will not be deleted even if they have expired. To delete binlog files manually, connect to the database and run flush logs; to forcibly generate a new binlog file.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.