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

相关文章:

  • 2021-10-07
  • 2021-06-15
  • 2021-10-06
  • 2021-08-01
  • 2021-12-19
  • 2021-07-20
  • 2021-12-23
猜你喜欢
  • 2021-06-19
  • 2021-12-27
  • 2021-12-06
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案