But there's another way and it avoids creating a script that manually deletes the bin logs. We can set a system variable called expire_logs_days. This parameter deletes log files that are greater than the value specified. It is dynamic and can be changed on-the-fly. Make sure that the value is at least the maximum number of lag days before the bin logs are applied.
To change it, log into the database as a super user (usually root) and set the global variable:
After changing it, make sure that you modify the .ini file also to reflect the value.
No comments:
Post a Comment