MySQL Binary Logs (`binlog.000*`) Filling Server Disk

Long `binlog_expire_logs_seconds` retained weeks of write logs on a small disk.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: MySQL Binary Logs (`binlog.000*`) Filling Server Disk Platform: MySQL
Common Root Causes:
  • Long `binlog_expire_logs_seconds` retained weeks of write logs on a small disk.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Run `PURGE BINARY LOGS BEFORE ...` and set `binlog_expire_logs_seconds = 604800` (7 days).
Safe Diagnostic Command:
SHOW BINARY LOGS; SHOW VARIABLES LIKE "binlog_expire_logs_seconds";
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

Long `binlog_expire_logs_seconds` retained weeks of write logs on a small disk. Recommended diagnostic: `SHOW BINARY LOGS; SHOW VARIABLES LIKE "binlog_expire_logs_seconds";`. Remediation: Run `PURGE BINARY LOGS BEFORE ...` and set `binlog_expire_logs_seconds = 604800` (7 days).

Worked Examples

  • Run `SHOW BINARY LOGS; SHOW VARIABLES LIKE "binlog_expire_logs_seconds";` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-mysql-binlog-disk-full-expire · Independently verified: 2026-11-25

Related Resources