Checking Whether the expire_logs_days Value in the Source Database Is Correct
During MySQL migration, you can set expire_logs_days to change the binlog retention period. Set expire_logs_day to a proper value to ensure that the binlog does not expire before data transfer resumes. This ensures that services can be recovered after interruption.
Failure Cause
The expire_logs_days parameter of the source database is set to 0.
Handling Suggestion
- If the source database is an RDS for MySQL DB instance, set expire_logs_days to a proper value by following the instructions provided in Setting a Local Retention Period for RDS for MySQL Binlogs.
- If the source database is an on-premises MySQL database, perform the following steps:
- Log in to the server where the MySQL source database is located.
- Run the following command to check the configured binlog retention period:
show variables like 'expire_logs_days';
Or
show variables like 'binlog_expire_logs_seconds';
- Manually modify the my.cnf configuration file and set the binlog retention period. The following uses three days as an example.
expire_logs_days=3
Or
binlog_expire_logs_seconds=259200;
- After the modification, restart the source database during a non-service period.
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.
For any further questions, feel free to contact us through the chatbot.
Chatbot