Updated on 2023-11-13 GMT+08:00
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, choose Parameters. On the Parameters tab, view the following parameters.
- If the kernel version is earlier than 2.0.45.230900, search for the log-bin parameter. If the parameter value is ON, binlog is enabled.
- If the kernel version is 2.0.45.230900 or later, search for the rds_global_sql_log_bin parameter. If the parameter value is ON, binlog is enabled.
To view the kernel version, click the instance name to go to the Basic Information page. In the DB Instance Information area, view the DB Engine Version field.Figure 1 Viewing the kernel version
- 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.
Parent topic: Log Management
Log Management FAQs
- Can I Enable general_log for GaussDB(for MySQL)?
- How Do I View All SQL Logs Executed by GaussDB(for MySQL)?
- How Do I View Slow Query Logs of GaussDB(for MySQL)?
- How Do I Enable and View Binlog of My GaussDB(for MySQL) Instance?
- How Do I Change the Binlog Retention Period?
- How Do I View Deadlock Logs of GaussDB(for MySQL)?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore