The fastest migration of mysql Data Tables. The storage engines of mysql are myisam and mysqlmyisam.
Link: http://blog.csdn.net/u010670689/article/details/41346689
Requirements:
During product development, there is a project branch, and the database needs to be copied with data, but the table data is large. The traditional insert .... select *... very slow !!
Process:
1. Enter the file directory of mysql on linux
You can find the mysql data file address in/etc/my. cnf.
[Root @ idata-slave3 etc] # cat/etc/my. cnf
[Mysqld]
Datadir =/var/lib/mysql
Socket =/var/lib/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. 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:
The test1 directory and table are empty:
3. Copy an object
4. Modify permissions
5. Query
Done !!