amazon-web-servicesmariadbrdsbinlog

Where can I find a variable about max bin log files in Maria DB ( I aint mean to say max_binlog_size)


Too many binary log files are in the disk.

the number of log files keep 14~16 as below. (normally 14)

mysql-bin-changelog.028255 134223043

mysql-bin-changelog.028256 134228506

mysql-bin-changelog.028257 134220246

mysql-bin-changelog.028258 134236483

mysql-bin-changelog.028259 134219139

mysql-bin-changelog.028260 134224849

mysql-bin-changelog.028261 134219266

mysql-bin-changelog.028262 134227092

mysql-bin-changelog.028263 16064294

mysql-bin-changelog.028264 134218994

mysql-bin-changelog.028265 134221078

mysql-bin-changelog.028266 134222337

mysql-bin-changelog.028267 134231770

mysql-bin-changelog.028268 134222330

mysql-bin-changelog.028269 119753944

I am pretty sure that the last tabs like '134227341' are from a global variable called max_binlog_size. but what makes the list keeps its size?

I did not set up this Maria DB, so I do not much about it. this is for RDS and MariaDB ver 10.x and no replication out there.


Solution

  • Suggest you set expire_logs_days to, say, 14. This would mean that any binlogs older than 14 days would be automatically deleted.

    14 days should give you enough time to notice that a Slave is broken and fix it before losing the binlogs that it needs.

    If you have not slaves and you don't use binlogs for backup, then set it to 1.

    (There are other approaches, but this is reasonably simple.)