Where Table Data Is Stored by the MyISAM Storage Engine

Q

Where Table Data Is Stored by the MyISAM Storage Engine? - MySQL FAQs - Storage Engines: MyISAM, InnoDB and BDB

✍: FYIcenter.com

A

By default, MySQL provides \mysql\data directory for all storage engines to store table data. Under \mysql\data directory, each database will have its own subdirectory to store table data.

If a new table is created with the MyISAM storage engine, several files will be created. For example, the new table "fyi_isam" created in the previous tutorial exercise will result the following files:

>cd \mysql\data\fyi

>dir
   8,620 fyi_isam.frm
       0 fyi_isam.MYD
   1,024 fyi_isam.MYI
...

These files are:

  • fyi_isam.frm - Created by MySQL to store "fyi_isam" table format.
  • fyi_isam.myd - Created by MyISAM to store "fyi_isam" table data. "myd" stands for "MyData". The data file size is 0, because there is no data row stored in the table yet.
  • fyi_isam.myi - Created by MyISAM to store "fyi_isam" table index. "myi" stands for "MyIndex". The primary key column "id" is indexed by default.

2007-05-10, 4555👍, 0💬