1225
MariaDBERRORNotableReplication / LoggingHIGH confidence

Fatal error during binary log purge

Production Risk

High — binary log infrastructure may be damaged; check replication integrity.

What this means

ER_BINLOG_PURGE_FATAL_ERR (1225, SQLSTATE HY000) is raised when an unrecoverable error occurs during PURGE BINARY LOGS, such as a file system error or corruption in the binary log index.

Why it happens
  1. 1Corrupted or missing binary log index file
  2. 2File system error (disk full, I/O error) during purge
  3. 3Manual deletion of binary log files without updating the index
How to reproduce
trigger — this will error
trigger — this will error
PURGE BINARY LOGS TO 'mysql-bin.000100';  -- may fail with fatal error

expected output

ERROR 1225 (HY000): Fatal error during log purge

Fix

Reset binary logs if index is corrupted

Reset binary logs if index is corrupted
-- After verifying replicas are caught up
RESET MASTER;

Why this works

RESET MASTER deletes all binary logs and resets the index. Use only when replicas are fully in sync.

Sources
Official documentation ↗

MySQL 8.0 — 1225 ER_BINLOG_PURGE_FATAL_ERR

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors