MySQL data files .MYD, .MYI, and .frm

2009 March 20
by kevin

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.

I couldn’t find this information directly in the MySQL documentation and google wasn’t much help either so hopefully this post will save someone else some search effort.

5 Responses leave one →
  1. 2009 May 29
    Cedric permalink

    >hopefully this post will save someone else some search effort.
    It did, thanks for your definition !

  2. 2009 October 5
    Nishith permalink

    Thanks for your post. It did help me.

  3. 2010 January 14
    Brian Forbes Colgate permalink

    Thanks from me, as well … answered this MySQL newbie’s questions right away … :-)

  4. 2010 March 18
    Matthew permalink

    Thanks from another satisfied reader :)

  5. 2010 April 16
    Thanks permalink

    Thanks, I was looking for this info too.

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS