When I create a database in MySQL and create a table called flat
in it, 4 files are generated:
db.opt flats.frm flats.MYD flats.MYI
This happens every time a table is created. What are these files?
Advertisement
Answer
The file db.opt
contains the database characteristics. It is updated every time the database is altered.
For the remaining 3 files:
- table.frm – Describes the table’s format (it is created regardless of the storage engine being used)
- table.MYI – Contains the MyISAM table index information (created for MyISAM storage engine)
- table.MYD – Contains the MyISAM table data (created for MyISAM storage engine)