Server1: 源數據庫
Server2: 目標數據庫
Table1: 需要導入的數據表
1. 在源數據庫中鎖表
USE database1;
FLUSH TABLE Table1 FOR EXPORT;
2. 復制相關文件到目標Server: 在sever1中操作。
scp /var/lib/mysql/database1l_scm2_f_rd_record* root@server2:/var/lib/mysql/database1
3. 修改目標server的權限
chown mysql.mysql /var/lib/mysql/database1/
4. 導入目標表
truncate table table1;
alter table table1 import tablespace;
http://dev.mysql.com/doc/refman/5.7/en/tablespace-copying.html
http://dev.mysql.com/doc/refman/5.7/en/innodb-transportable-tablespace-examples.html