简体   繁体   中英

MySQL binlog_expire_logs_seconds not working

I have configured the database using SET GLOBAL binlog_expire_logs_seconds = 259200;query to purge binary logs older then 3 days. Using MySQL 8.0.22. This does not seem to have any effect. bin logs are accumulating under /var/lib/mysq/dbname-bin.000xx files. Executing

PURGE BINARY LOGS BEFORE '2020-.......' 

works, but I would like the DB engine to purge those logs on its own without myself calling it. Otherwise binlogs take most of the disk space. Please suggest.

I had the same problem (but on Windows 10), I edited my.ini located in c:/xampp/mysql/bin and added the following:

binlog_expire_logs_seconds=60

Does this work for you?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM