MySQL database datafiles in windows SystemData directory

Posted on

Question :

When I create a database and some tables in MySQL Server, it makes some data files in Windows SystemData directory in C:ProgramDataMySQLMySQL Server 5.5datamydb.

Each table has three files with these suffixes:


I don’t know what those exactly are.

Please explain to me what those are and what is usages?

Thanks in advance.

Answer :

Those three files represent one MyISAM table

For the MyISAM table, mydb.TableName, here is what they are

  • TableName.frm : Table format file (all Storage Engines have this one)
  • TableName.MYD : MyISAM data for the table
  • TableName.MYI : MyISAM Indexes for the Table

Click to read MySQL Documentation for MyISAM Storage Engine. In part, it says:

Each MyISAM table is stored on disk in three files. The files have names that begin with the table name and have an extension to indicate the file type. An .frm file stores the table format. The data file has an .MYD (MYData) extension. The index file has an .MYI (MYIndex) extension.

MyISAM is the historical storage engine of the MySQL server on the hard disk, a MyISAM table is represented by three files:

table_name.frm which contains the structure of the table

table_name.MYD containing data.

table_name.MYI containing the index

Source : MySQL 5.6
Administartion et optimisation
Edition ENI

Leave a Reply

Your email address will not be published. Required fields are marked *