mysql5.6新特性--transportable tablespace
2015-11-28 14:41
471 查看
背景
1、5.6之前所有table的元数据,表空间id,都在system tablespace,导数据、恢复数据比较麻烦。作用
1、导数据、恢复数据、数据迁移(比如考到ssd等性能好、容量高的机器)使用条件以及约束
1、file_per_table开启2、import table的page_size大小一样
3、不支持分区表导出
4、不支持有外键约束的其中一个表导出,除非关闭foreign_key_checks,或者两个约束表一起导出
5、ALTER TABLE … IMPORT TABLESPACE does not enforce foreign key constraints on imported data. If there are foreign key constraints between tables, all tables should be exported at the same (logical) point in time.
6、In MySQL 5.6 or later, importing a tablespace file from another server works if both servers have GA (General Availability) status and their versions are within the same series. Otherwise, the file must have been created on the server into which it is imported.
7、In replication scenarios, innodb_file_per_table must be set to ON on both the master and slave.
操作
1、dest:ALTER TABLE t DISCARD TABLESPACE;2、source:FLUSH TABLES t FOR EXPORT;会创建一个.cfg文件来校验schema
3、copy两个文件
4、source:unlock tables
5、dest:ALTER TABLE t IMPORT TABLESPACE;
相关文章推荐
- MySQL批量update语句优化
- mysql-5.6.17源码调试
- 如何正确获取MYSQL的ADO连接字符串
- mysql 解压缩版配置细则
- 10、MySQL数据库乱码解决办法
- "Host 'localhost' is not allowed to connect to this MySQL server" 的原因及解决办法 (2010
- mysql 按日月周分组统计
- 第一次window 7设置mysql环境中遇到的问题以及解决办法
- hibernate插入Mysql数据库出现中文乱码情况从这5个方面解决
- mysql中count(1)与count(*)比较
- mysql command line client和mysql.exe输入密码后闪退问题解决方法
- mysql中的select查询
- 阿里云服务器无法远程其他的mysql服务器
- 0001.安装mysql
- MySQL exists的用法介绍
- MYSQL GROUP_CONCAT 版本兼容性
- win7下配置免安装版的MySQL 5.7.9
- Mysql 查询性能优化
- MySQL时间操作
- MySQL 5.7.**版本 服务启动停止,1067错误以及access denied