What Is .frm

Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.

Last updated: April 10, 2026

Quick Answer: .FRM files are MySQL table definition files that store the structure and metadata of database tables, used since MySQL 3.23 (released in 2000) but phased out in MySQL 8.0 (October 2018) in favor of serialized dictionary storage. They contain binary-encoded information about table columns, data types, indexes, and constraints, allowing MySQL to reconstruct table structure during server startup.

Key Facts

Overview

.FRM files are binary database definition files created and maintained by MySQL to store the structural information of database tables. These files serve as blueprints containing critical metadata such as column names, data types, default values, constraints, and index definitions that MySQL needs to understand and manage tables correctly.

For over two decades, .FRM files were an essential component of MySQL's core architecture, automatically created whenever a new table was defined. Each table generated a corresponding .frm file stored in the database directory on disk (e.g., /var/lib/mysql/database_name/table_name.frm). However, with MySQL 8.0's release in October 2018, this fundamental storage mechanism was replaced by a centralized data dictionary system, eliminating the need for individual .FRM files and modernizing how MySQL manages table metadata internally.

How It Works

.FRM files operate as persistent storage containers for table metadata that MySQL requires to manage and access tables efficiently:

Key Comparisons

Aspect.FRM Files (MySQL <8.0)Serialized Dictionary (MySQL 8.0+)
Storage ArchitectureIndividual binary files per table distributed across database directoriesCentralized binary format stored inside shared ibdata1 system tablespace file
File ProliferationOne .frm file per table plus multiple .ibd and .myd files, thousands of files in large databasesSingle data dictionary file containing all metadata for all tables and databases
Access SecurityReadable file locations but binary format requires MySQL server tools to interpretFully encapsulated within system tablespace with controlled access through MySQL server only
Server Startup PerformanceSlower initialization requiring file system scans and parsing of thousands of individual filesFaster startup with preloaded dictionary already buffered in InnoDB cache
Backup ComplexityRequires separate file-level backups or MySQL dump to preserve both .frm and data filesSingle consistent backup captures all metadata atomically within InnoDB transactions

Why It Matters

Understanding .FRM files remains important for database professionals managing legacy MySQL installations or performing recovery operations on systems predating MySQL 8.0. While newer versions have eliminated this file format entirely, millions of production databases worldwide still rely on .FRM files, making knowledge of their purpose, structure, and management essential for effective database administration, version upgrades, and disaster recovery strategies.

Sources

  1. MySQL 8.0 Data DictionaryCreative Commons Attribution License
  2. MySQL 5.7 Table FilesCreative Commons Attribution License
  3. MySQL 8.0 Upgrade InformationCreative Commons Attribution License

Missing an answer?

Suggest a question and we'll generate an answer for it.