1333
MariaDBerrorservermedium confidence

Malformed file type header

Production Risk

High — the affected table or object is inaccessible until the file is replaced.

What this means

A MySQL metadata file (frm, TRG, etc.) has a corrupt or unrecognised header.

Why it happens
  1. 1File system corruption
  2. 2Manual editing of MySQL data directory files
  3. 3Incomplete copy of a data directory
How to reproduce
trigger — this will error
trigger — this will error
-- Internal error encountered when accessing a table, view, or trigger.

expected output

ERROR 1333 (HY000): Malformed file type header in file

Fix 1

Restore from backup

Why this works

Replace the corrupt file with a known-good copy from backup.

Fix 2

Recreate the object

Recreate the object
DROP TABLE IF EXISTS t; CREATE TABLE t ...;

Why this works

Produces a fresh, valid metadata file.

What not to do

Version notes

Sources
Official documentation ↗

MySQL 8.0 — 1333 ER_FPARSER_BAD_HEADER

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

← All MariaDB errors