14.6.2 Moving or Copying InnoDB Tables to Another Machine 移动或者copy InnoDB 表到另外的机器
14.6.2 Moving or Copying InnoDB Tables to Another Machine 移动或者copy InnoDB 表到另外的机器 这个章节描述技术关于移动或者copying 一些或者全部的InnoDB 表到不同的服务器。 比如,你可以移动整个MySQL 实例到一个更大,更快的服务器, 你需要克隆整个MySQL 实例到一个新的复制slave server, 你可以拷贝单个表到另外的server 来开发和测试应用,或者到数据库仓库看来产生报告。 Techniques for moving or copying InnoDB tables include: Transportable Tablespaces MySQL Enterprise Backup Copying Data Files (Cold Backup Method) Export and Import (mysqldump) 使用小写名称对于跨平台的移动或者复制: 在Windows上,InnoDB总是存储数据库和表名字内部小写格式。 移动databases 以一个2进制格式从Unix到Windows 或者从Windows到Unix, 创建所有的数据库和表使用小写名字。 一个方便的方式来完成是增加下面行到[mysqld]章节 [mysqld]
lower_case_table_names=1 Transportable Tablespaces MySQL 5.6.6中介绍, 传输表空间功能使用FLUSH TABLES FOR EXPORT 来准备InnoDB 表 用于copy 从一个服务器到另外一个。 为了使用这个功能, InnoDB 表必须在innodb_file_per_table 为ON的情况下创建, 这样每个InnoDB 表有它自己的表空间 MySQL Enterprise Backup MySQL 企业备份产品允许你备份一个运行的MySQL 数据库, 包括InnoDB和MyISAM 表,以最小的中断来操作产生一个一致性的数据库快照。 当MySQL Enterprise Backup 是copyInnoDB 表, 读取和写入到InnoDB和MyISAM表可以继续。 在拷贝MyISAM 和其他非InnoDB表,读(不是写) 到那些表是允许的。 额外的,MySQL Enterprise Backup 可以创建压缩的备份文件, backup InnoDB的子集。集合MySQL binary log, 你可以执行按时间点恢复。 Copying Data Files (Cold Backup Method) 复制数据文件(冷备份方法) 你可以移动一个InnoDB 数据库实现通过复制所有相关的文件 就像MyISAM 数据文件, InnoDB 数据和log files 是2进制兼容在多有的平台 有相同的浮点数格式。 可移植考虑对于.ibd文件: 当你移动或者copy .ibd文件,数据库目录名字必须相同在源和目的系统。 表定义存储在InnoDB 共享的表空间包含数据库名字, 事务IDs 和log sequence numbers 存储在表空间文件在不同数据库也不同 移动一个.ibd 文件和相关的表从一个数据库到另外一个,使用一个RENAME 语句 RENAME TABLE db1.tbl_name TO db2.tbl_name; 如果你有一个干净的的.ibd文件的备份,你可以恢复它到MySQL 安装 如下: 1.表没有被删除或者truncate 资产你复制.ibd 文件, 因为这样做会改变table id 存储在表空间里。 2. 执行ALTER TABLE 语句来删除当前的.ibd文件 ALTER TABLE tbl_name DISCARD TABLESPACE; 3. 复制备份.ibd 文件到适当的数据库目录 4.执行ALTER TABLE 语句告诉InnoDB 使用新的.ibd文件
14.6.2 Moving or Copying InnoDB Tables to Another Machine 移动或者copy InnoDB 表到另外的机器的更多相关文章
- 14.8.4 Moving or Copying InnoDB Tables to Another Machine 移动或者拷贝 InnoDB 表到另外机器
14.8.4 Moving or Copying InnoDB Tables to Another Machine 移动或者拷贝 InnoDB 表到另外机器 这个章节描述技术关于移动或者复制一些或者所 ...
- 14.8.3 Physical Row Structure of InnoDB Tables InnoDB 表的物理行结构
14.8.3 Physical Row Structure of InnoDB Tables InnoDB 表的物理行结构 一个InnoDB 表的物理行结构取决于在创建表指定的行格式 默认, Inno ...
- 14.8.2 Role of the .frm File for InnoDB Tables InnoDB 表得到 .frm文件的作用
14.8.2 Role of the .frm File for InnoDB Tables InnoDB 表得到 .frm文件的作用 Vsftp:/data01/mysql/zjzc# ls -lt ...
- 14.8.1 Creating InnoDB Tables 创建InnoDB 表
14.8.1 Creating InnoDB Tables 创建InnoDB 表 创建一个InnoDB表,使用CREATE TABLE 语句,你不需要指定ENGINE=InnoDB 子句 如果Inno ...
- 14.6.7?Limits on InnoDB Tables InnoDB 表的限制
14.6.7?Limits on InnoDB Tables InnoDB 表的限制 警告: 不要把MySQL system tables 从MyISAM 到InnoDB 表. 这是不支持的操作,如果 ...
- 14.6.1 Creating InnoDB Tables 创建InnoDB 表:
14.6.1 Creating InnoDB Tables 创建InnoDB 表: 创建一个InnoDB 表,使用CREATE TABLE 语句,你不需要指定 ENGINE=InnoDB子句 如果In ...
- 14.2.5.1 Role of the .frm File for InnoDB Tables InnoDB .frm文件的作用
14.2.5.1 Role of the .frm File for InnoDB Tables: 14.2.5.1 Role of the .frm File for InnoDB Tables I ...
- Error copying image in the datastore: Not allowed to copy image file
opennebula error copying image in the datastore not allowed to copy image file Error copying image i ...
- Effective C++:条款14:在中小企业资源管理copying表现
(一) 在一项条款说法auto_ptr和tr1::share_ptr适合heap-based资源.然而,并非所有的资源都heap-based的.换句话说不tr1::shared_ptr 和 auto_ ...
随机推荐
- UVA 10905 Children's Game 孩子的游戏 贪心
题意:给出N个数,要求把它们拼凑起来,让得到的数值是最大的. 只要分别比较两个数放前与放后的值的大小,排序后输出就可以了. 比如123和56,就比较12356和56123的大小就行了. 写一个比较函数 ...
- IOS开发中UIBarButtonItem上按钮切换或隐藏实现案例
IOS开发中UIBarButtonItem上按钮切换或隐藏案例实现案例是本文要介绍的内容,这个代码例子的背景是:导航条右侧有个 edit button,左侧是 back button 和 add bu ...
- linux 内核代码精简
#为了提高性能,文件系统一般都是以 relatime形式挂载进来的,见:/etc/fstab #更新一下mtime,这样,编译过程中用到的文件的atime都会被更新 find . -exec touc ...
- 高级UIKit-08(TCPSocket)
[day1001_MoviePlayer]:视频播放 需要导入MediaPlayer.framework - (void)viewDidLoad { [super viewDidLoad]; NSUR ...
- Hibernate 3中如何获得库表所有字段的名称
15问:Hibernate 3中如何获得库表所有字段的名称 答:可以使用以下的程序获得. Configuration conf = new Configuration(); conf.configur ...
- Multiple bindings were found on the class path(转)
Multiple bindings were found on the class path SLF4J API is designed to bind with one and only one u ...
- 高级特性(6)- 高级Swing
6.1 列表 6.1.1 JList构件 6.1.2 列表模式 6.1.3 插入和移除值 6.1.4 值的绘制6.2 表格 6.2.1 简单表格 6.2.2 表格模型 6.2.3 对行和列的操作 6. ...
- js导出table到excel,同时兼容FF和IE
前台调用(第一个参数是table的id): <input value="导出" type="button" /> function toExcel( ...
- Linux进程阻塞的相关知识
1.如果驱动程序无法立即满足要求,该如何响应? 当数据不可用时,用户可能调用read:或者进程试图写入数据,但因为输出缓冲区已满,设备还未准备好接受数据.调用进程通常不会关心这类问题,程序员只会简单调 ...
- rowid结构浅析
select rowid from dual AAAAB0AABAAAAOhAAA rowid结构如下: 对象号 文件号 块号 行号 XXXXXX XXX XXXXXX X ...