1182
MariaDBERRORNotableReplication / LoggingHIGH confidence
Got error during FLUSH_LOGS
Production Risk
Medium — logging failure can disrupt replication and point-in-time recovery.
What this means
ER_ERROR_DURING_FLUSH_LOGS (1182, SQLSTATE HY000) occurs when MySQL fails to flush and rotate binary logs or error logs. This is commonly caused by disk full conditions or permissions issues on the log directory.
Why it happens
- 1Disk full when trying to create a new binary log file
- 2Insufficient permissions on the MySQL log directory
- 3File descriptor limit reached
How to reproduce
trigger — this will error
trigger — this will error
FLUSH LOGS; -- fails if disk full or permission denied
expected output
ERROR 1182 (HY000): Got error during FLUSH_LOGS
Fix
Free disk space and retry
Free disk space and retry
-- Check disk usage, purge old binary logs PURGE BINARY LOGS BEFORE DATE_SUB(NOW(), INTERVAL 7 DAY); FLUSH LOGS;
Why this works
Removing old binary logs frees space, allowing new log files to be created.
Sources
Official documentation ↗
MySQL 8.0 — 1182 ER_ERROR_DURING_FLUSH_LOGS
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev