This article is half-done without your Comment! *** Please share your thoughts via Comment ***
What is the role format file (.frm file) ?
FRM stands for FoRMat and it is storing data dictionary information for tables in .frm files. It describes the table’s format like table definition, including fields and structure. The name of this file is same as the table name.
Specially InnoDB engine stores encoded information about the table and managing its own data dictionary inside the tablespace.
When MySQL drops a table or a database, it also deletes .frm file which is associated with it.
We can also take backup of .frm file, restore the table definition from .frm file, can move .frm file from one storage to another storage.
The .frm file associated with a table that can be found in the directory that represents the database to which the table belongs.
You can check the MySQL data directory using below SHOW command.
1 |
SHOW VARIABLES LIKE 'datadir'; |
Important Note:
There is also one limitation of .frm file structure.
The portion of the information stored in the .frm file cannot grow beyond the 64KB limit, so if the table definition reaches this size, no more columns can be added.