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