使用mysql的传输表空间 迁移表

 

 

 

A:
show create table pay_records \G

  

,copy the stament
 
################################################
 
B:use bigdata; paste the stament, find the table path  on the disk,and
alter table pay_records discard tablespace

 

 
 
#########################################
A:
flush tables  pay_records for export;
system scp  /data/db/mysql3306/data/tybdata/pay_records.{cfg,ibd} root@IP:/data/mysql/bigdata/
unlock tables;

 

 
##############################
B:
chown mysql:mysql /data/mysql/bigdata/*
 Alter table pay_records import tablespace;

 

 

posted @ 2019-05-11 14:13  monkeybron  阅读(111)  评论(0)    收藏  举报