17.1.1.9 Introducing Additional Slaves to an Existing Replication Environment 引入额外的Slaves 到一个存在的复制
17.1.1.9 Introducing Additional Slaves to an Existing Replication Environment 引入额外的Slaves 到一个存在的复制环境: 如果添加另外的slave 到一个存在的复制配置,你可以这样做 不需要停止master. 代替的是,设置新的slave 通过 拷贝一份存在的slave,除了配置新的slave 使用不同的server-id值 复制现有的存在slave: 1.关闭存在的slave: shell> mysqladmin shutdown 2.将数据目录从存在的slave 复制到新的slave,你可以通过创建tar或者WinZip文件, 或者通过执行一个cp或者rsync,确保也包括log files和relay log files. 一个通用的问题是遇到 当增加新的复制slaves 是新的slaves 失败 一系列的警告和错误信息如下: 071118 16:44:10 [Warning] Neither --relay-log nor --relay-log-index were used; so
replication may break when this MySQL server acts as a slave and has his hostname
changed!! Please use '--relay-log=new_slave_hostname-relay-bin' to avoid this problem.
071118 16:44:10 [ERROR] Failed to open the relay log './old_slave_hostname-relay-bin.003525'
(relay_log_pos 22940879)
071118 16:44:10 [ERROR] Could not find target log during relay log initialization
071118 16:44:10 [ERROR] Failed to initialize the master info structure 这是由于事实,如果--relay-log 选项没有被指定,relay log 文件包含了主机名作为文件名的部分 (这个对于relay log index 文件也是一样 如果 --relay-log-index 选项没有被指定 为了避免这个问题,使用 相同的值对于--relay-log 在新的slave,和用于存在的slave (如果选项没有被指定在存在的slave上,使用existing_slave_hostname-relay-bin.) 如果这个是不行的,复制存在的slave的relay log index file 到新的slave 设置 --relay-log-index 在新的slave 来匹配 在存在的slave上。(如果这个选项没有被指定在存在的slave上,使用existing_slave_hostname-relay-bin.index) 作为一种选择--如果你已经尝试启动新的slave(遵循下面存在的步骤) a.如果你没有这么做,执行stop slave 在新的slave上 如果 你已经启动存在的slave,执行一个stop slave 在存在的slave上 b. 复制存在的slave的relay log 文件的内容到新的slave的relay log index file,确保覆盖任何存在的文件的内容. c.继续在本节中其余步骤: 复制master info 和relay log info 信息库从存在的slave到新的slave. 那些保留当前的log的位置对于master的binary log和slave的relay log 4.启动存在的slave 5.在新的slave上, 编辑配置和给定新的slave 一个唯一的server-id 不被master和其他任何的slave使用 开始新的slave,slave使用信息在它的master info 信息库来开始复制
17.1.1.9 Introducing Additional Slaves to an Existing Replication Environment 引入额外的Slaves 到一个存在的复制的更多相关文章
- 17.1.1.7 Setting Up Replication with New Master and Slaves 设置复制使用新的master和slaves:
17.1.1.7 Setting Up Replication with New Master and Slaves 设置复制使用新的master和slaves: 最简单和最直接方式是设置复制使用新的 ...
- 17.1.1.7 Setting Up Replication with New Master and Slaves 设置复制对于新的Master和Slaves:
17.1.1.7 Setting Up Replication with New Master and Slaves 设置复制对于新的Master和Slaves: 最简单和最直接的方法是设置复制用于使 ...
- 17.1.1.3 Creating a User for Replication 创建一个用于用于复制:
17.1.1.3 Creating a User for Replication 创建一个用于用于复制: 每个slave 连接到master 使用一个MySQL 用户名和密码, 因此必须有一个用户账户 ...
- 17.1.1 How to Set Up Replication 设置复制:
17.1.1 How to Set Up Replication 设置复制: 17.1.1.1 Setting the Replication Master Configuration 17.1.1. ...
- 17.1.1 How to Set Up Replication
17.1.1 How to Set Up Replication 17.1.1.1 Setting the Replication Master Configuration 17.1.1.2 Sett ...
- Slony-I 文摘
http://www.onlamp.com/pub/a/onlamp/2004/11/18/slony.html 我特别喜欢这篇文章,就进行了转载和翻译. Introducing Slony by ...
- 17.1.4 Replication and Binary Logging Options and Variables 复制和Binary logging 选项和变量
17.1.4 Replication and Binary Logging Options and Variables 复制和Binary logging 选项和变量 下面的章节包含信息关于mysql ...
- 17.1 Replication Configuration
17.1 Replication Configuration 17.1.1 How to Set Up Replication 17.1.2 Replication Formats 17.1.3 Re ...
- 17.1 Replication Configuration 复制:
17.1 Replication Configuration 复制: 17.1.1 How to Set Up Replication 17.1.2 Replication Formats 17.1. ...
随机推荐
- hbase 单机安装问题
报zookeeper exception not found I fixed this by editing the file "/usr/local/hbase-0.94.1/conf/h ...
- 用rsync从Linux到Windows远程备份
论 rsync是Linux系统下的数据镜像备份工具,从软件的命名上就可以看出来 了——remote sync.rsync支持大多数的类Unix系统,无论是Linux.Solaris还是BSD上都经过了 ...
- java核心技术学习笔记之三程序设计结构
一 基本数据结构 必须包括在类中 必须具备 public static main方法 大小写敏感 二.数据类型 四种整数类型: Int 4字节 short 2字节 long8字节 byte1字节 二种 ...
- Thread-safety with regular expressions in Java
As mentioned in our introduction to the Pattern and Matcher classes, the Java regular expression API ...
- Vim 实用技术,第 2 部分: 常用插件(转)
http://blog.jobbole.com/20619/ 2.1. gzip(压缩文件支持) 作者:Bram Moolenar 网站脚本编号:无(包含在 Vim 的标准发布之中) 安装说明:无 功 ...
- C# 保留小数点后两位(方法总结)
最简单使用: float i=1.6667f; string show=i.ToString("0.00"); //结果1.67(四舍五入) 其他类似方法: string show ...
- Java中byte转int的方法
byte转化为int有两种情况: 1)要保持数值不变 应用场景:数值计算.等等. 方法:能够直接採用强制类型转换:int i = (int) aByte, 比如:若aByte=0xff(即数值为-1) ...
- android媒体--图库与API层MediaPlayer的交互
众所周知一个媒体播放器新建的几个步骤: Mediaplayer mp = new MediaPlayer(0 mp.setDatasource(xxx); mp.setDispalyer(xxx); ...
- 标准C函数库的使用方法
本篇介绍若干经常使用的标准C函数的使用方法,主要介绍stdio(标准输入输出).math(数字函数库).time(时间函数库).stdlib(标准函数库)string(标准字符串函数)等. 最后更新 ...
- ajax post传值
一.字符串 $.ajax({ type: "POST", data: {"ID&quo ...