mSQL Data Migration

Source: Internet
Author: User

Migrate database files directly.

First, MySQL database file introduction

Each MySQL database is stored in a folder with the same name as the database, which includes MySQL database files and database files created by MySQL's storage engine.

1. mysql created and managed database files:

. frm file: A frame structure that stores data tables with the same file name as the table name, and each table corresponds to a frm file with the same name, regardless of the operating system and the storage engine, regardless of what operating system the MySQL is running on and which storage engine is used.

In addition to the required. frm files, depending on the storage engine used by MySQL (the two storage engines commonly used by MySQL are MyISAM and InnoDB), the storage engine creates separate database files.

2. MyISAM database Table file:

. MyD file: That is my data, the table file

. Myi file: My index, indexed file

. log files: Log files

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

InnoDB database file (that is, InnoDB file set, Ib-file set):

IBDATA1, IBDATA2, etc.: System tablespace files, storing InnoDB system Information and user database table data and indexes, all tables shared

. ibd Files: Single-table space files, each using a tablespace file (file per table) that holds user database table data and indexes

Log files: Ib_logfile1, Ib_logfile2

Second, the MySQL database storage location:

1, MySQL If you use the MyISAM storage engine, the database file type includes. frm,. MYD,. MYI, the default storage location is C:\Documentsand Settings\All Users\Application Data\mysql\mysql Server 5.1\data

2, MySQL If you use the InnoDB storage engine, the database file type includes. frm, ibdata1,. IBD, storage location two,

The default storage location for. frm files is C:\Documents and Settings\All Users\applicationdata\mysql\mysql Server 5.1\data,ibdata1. The default location for IBD files is the Data folder in the MySQL installation directory

Use MySQL to query show variables like '%datadir% '; Get Data folder location.

@0040 should be an escape of @.

The data of the Order class in the database is stored on time basis, and the migrated data is copied directly from the database file.

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

mSQL Data Migration

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.