Data File for MyISAM Storage Engine in MySQL

Q

Where Table Data Is Stored by the MyISAM Storage Engine in MySQL?

✍: 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.

 

Backup Tables by Copying MyISAM Files in MySQL

Tables Using MyISAM Storage Engine in MySQL

Storage Engines: MyISAM, InnoDB and BDB in MySQL

⇑⇑ MySQL Database Tutorials

2017-09-01, 2180🔥, 0💬