I am using 5.7.37-log MySQL Community Server. my mysqld.cnf looks below:
server_id = 11
log_bin = bin.log
log-bin-index = bin-log.index
binlog_format = row
max_binlog_size = 100M
socket = mysql.sock
expire_logs_days = 1
when i check my logs they keep on growing though i mention them to get expire in 1 day. using expire_logs_days.
With this above config, can i expect the logs be removed automatically or should I again do it manually ? I see some forms saying
PURGE BINARY LOGS BEFORE NOW() - INTERVAL 1 DAY;
But i dont understand the point in manually running above statement when we already set the config.
Please help me understanding the expiry mechanism of bin logs. As I used expiry after 1 day, does the size of the bin.00001 and bin.0002 etc. will be reduded every day ? or how can i identify that the logs are really expiring.?
attaching screenshot of my generated bin logs.