1481
MariaDBERRORNotableReplicationHIGH confidence
Being purged log file is not an active log file
Production Risk
Low — administrative operation; no data was affected.
What this means
ER_LOG_PURGE_NO_FILE (1481, SQLSTATE HY000) is raised when PURGE BINARY LOGS specifies a log file that does not exist or is already purged.
Why it happens
- 1The specified binary log file has already been purged
- 2Typo or incorrect log file name in the PURGE BINARY LOGS command
How to reproduce
trigger — this will error
trigger — this will error
PURGE BINARY LOGS TO 'mysql-bin.000001'; -- If that file no longer exists
expected output
ERROR 1481 (HY000): Being purged log mysql-bin.000001 was not found
Fix
Check available binary logs before purging
Check available binary logs before purging
-- List available binary logs: SHOW BINARY LOGS; -- Purge up to an existing log file: PURGE BINARY LOGS TO 'mysql-bin.000010'; -- Or purge by date: PURGE BINARY LOGS BEFORE '2024-01-01 00:00:00';
Why this works
Verify which binary logs exist before specifying a target for PURGE BINARY LOGS.
Sources
Official documentation ↗
MySQL 8.0 — 1481 ER_LOG_PURGE_NO_FILE
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev