MySQL的 .frm .myi .myd 文件

本文最后更新于2015年5月16日,已超过 1 年没有更新,如果文章内容失效,还请反馈给我,谢谢!

  • mysql .frm .myi .myd
  • mysql .frm .myi .myd percona
  • .frm 保存的是表的结构
  • .MYD 保存的是表的数据记录
  • .MYI 保存的是表的索引


  • .FRM  =>  It has the table structure of your table or table definition
  • .MYI  =>  It has the indexes of your table
  • .MYD  =>  It contains your data

Engines Specific:


Innodb has only .frm files and it has its own tablespace where it contains indexes and datas and its shared in databases.


MyIsam has all the three files. where .myi has your indexes, .myd has your table datas and .frm has its table definition.


A MySQL database creates a number of different data files in the mysql data directory (typically/var/lib/mysql). The following are the differences between the data files created:

File Extension Purpose
.frm table definition
.MYD table data
.MYI table indices

I believe these files are created for both MyISAM and InnoDB table types because the MySQL documentation references these types with respect to MyISAM and I definitely see them on my InnoDB tables.



声明: 除非注明,ixyzero.com文章均为原创,转载请以链接形式标明本文地址,谢谢!

One thought on “MySQL的 .frm .myi .myd 文件”


电子邮件地址不会被公开。 必填项已用*标注