MySQL data file introduction and storage location _ MySQL

Source: Internet
Author: User
MySQL data file introduction and storage location 1. MySQL database file introduction

Each MySQL database is stored in a folder with the same name as the database. the MySQL database files include the database files created by MySQL and the database files created by the storage engine used by MySQL.

1. database files created and managed by MySQL:

. Frm File: The framework structure of the data table. the file name is the same as the table name. each table corresponds to an frm file of the same name, which is irrelevant to the operating system and storage engine, that is, no matter what operating system MySQL runs on and what storage engine is used, this file is available.

Apart from the necessary. frm files, the storage engine creates different database files based on the storage engine used by MySQL (two storage engines commonly used by MySQL are MyISAM and InnoDB.

2. MyISAM database table file:

. MYD File: MY Data, table Data file

. MYI File: MY Index, Index file

. Log File: log file

3. InnoDB uses tablespace to manage data and store table data and indexes,

InnoDB database file (I .e., InnoDB file set, ib-file set ):

Ibdata1 and ibdata2: System tablespace files that store InnoDB system information and user database table data and indexes. all tables share

. Ibd file: a single table space file. each table uses a single table space file (file per table) to store user database table data and indexes.

Log files: ib_logfile1 and ib_logfile2

II. MySQL database storage location:

1. if MySQL uses the MyISAM storage engine, the database file types include. frm ,. MYD ,. MYI. the default storage location is C:/Documentsand Settings/All Users/Application Data/MySQL Server 5.1/data.

2. if MySQL uses the InnoDB storage engine, the database file types include. frm, ibdata1, and. ibd. There are two storage locations,

. The default storage location of frm files is C:/Documents and Settings/All Users/ApplicationData/MySQL Server 5.1/data, ibdata1 ,. the default storage location of ibd files is the data folder under the MySQL installation directory.


Reference: http://blog.csdn.net/yaotinging/article/details/6671506

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.