This article link: http://blog.csdn.net/u010670689/article/details/41346689
Demand:
In the development of the product process, there is a project branch, the database needs to have data copy, but the table data is very large, with traditional insert INTO .... select * ... Very slow!!
Process:
1. Enter the MySQL file directory on Linux
The address of the MySQL data file can be found in the/ETC/MY.CNF
[Email protected] etc]# CAT/ETC/MY.CNF
[Mysqld]
Datadir=/var/lib/mysql
Socket=/var/lib/mysql/mysql.sock
User=mysql
# Disabling Symbolic-links is recommended to prevent assorted security risks
Symbolic-links=0
[Mysqld_safe]
Log-error=/var/log/mysqld.log
Pid-file=/var/run/mysqld/mysqld.pid
Default-character-set=utf8
[Client]
Password=123qwe
2. View the database directory
Database list:
Our goal is to copy data from test to Test1:
Test directory structure:
Table information:
Both the Test1 directory and the table are empty:
3. Copying files
4. Modify Permissions
5. Enquiry
Complete!!
MySQL data sheet is the fastest migration, MySQL's storage engine is: MyISAM