I recently had my disk space completely filled with mysql binary log files (
I was able to resolve short term by with
PURGE BINARY LOGS TO (via this answer).
To try and keep it from happening going forward I set lower limits on
max_binlog_size. Yet, I'm still worried that a huge number of log files could be generated in a short period without a limit on the total space used by logs or the total number of logs allowed.
Is there something I'm missing? Or do I just need to keep setting
expire_logs_days lower or turn off binary logging all together if it keeps being a problem?
I understand it's important to diagnose what's causing the logs to fill up quickly and solve that issue. This question is not about how to diagnose what's making them fill quickly, but rather – how do I safeguard against the disk filling to 100% and crashing the server in the case that something is setup wrong or an unexpected circumstance starts to fill these logs.