17.1.4 Replication and Binary Logging Options and Variables  复制和Binary logging 选项和变量

下面的章节包含信息关于mysqld选项和server 变量 用于复制和用于控制binary log.

选项和变量对于使用复制Masters和复制slaves是分别包括,因为选项和变量涉及binary logging.

这个选项是常见的在master和slave 复制servers,是用于复制来启动master和slave server来标识它们唯一的。

在master 和每个slave上,你必须使用--server-id 选项来创建一个唯一的复制ID 

Unique 意味着每个ID必须不同域其他ID 在任何其他复制master或者slave.

如果你省略了--server-id,  默认ID是0,在这种情况下,master 拒绝所有slaves的链接,

server_uuid 

mysql> show variables like '%server%';
+---------------------------------+--------------------------------------+
| Variable_name | Value |
+---------------------------------+--------------------------------------+
| character_set_server | utf8 |
| collation_server | utf8_general_ci |
| innodb_ft_server_stopword_table | |
| server_id | 135 |
| server_id_bits | 32 |
| server_uuid | d6881046-9be4-11e6-8b6a-0050568a6b1d |
+---------------------------------+--------------------------------------+
6 rows in set (0.00 sec) 从 MySQL 5.6开始,server 产生一个真的UUID 除了 --server-id 这个值是全局,只读变量 当启动时,MySQL server 自动得到一个UUID 如下: 1. 尝试读取和使用UUID 写入到文件data_dir/auto.cnf (data_dir 是server的数据目录)
zabbix:/data01/mysql# cat auto.cnf
[auto]
server-uuid=d6881046-9be4-11e6-8b6a-0050568a6b1d 2.如果data_dir/auto.cnf 没有被找到,产生一个新的UUID 保存它到这个文件,如果需要创建这个文件 auto.cnf 文件格式类似于 my.cnf or my.ini files. 在MySQL 5.6,auto.cnf只有一个单独的 [auto] section 包含一个单独的server_uuid [auto]
server_uuid=8a94f357-aab4-11df-86ab-c80aa9429562 注意: auto.cnf file 是自动生成的,不要尝试些或者修改这个文件 在MySQL 5.6开始,当使用MySQL 复制,masters 和slaves 知道彼此的UUIDs.

17.1.4 Replication and Binary Logging Options and Variables 复制和Binary logging 选项和变量的更多相关文章

  1. 涉及到复制和二进制日志中的选项和变量-Replication and Binary Logging Options and Variables

    在搭建复制中,有些参数需要我们留意,在这里罗列出来,供大家参考一下,以GTID为基础 --server-id server-id:这是一个全局的可动态调整的变量,取值范围为0-4294967295,也 ...

  2. 17.1.1.4 Obtaining the Replication Master Binary Log Coordinates 得到复制master binary log 位置:

    17.1.1.4 Obtaining the Replication Master Binary Log Coordinates 得到复制master binary log 位置: 你需要master ...

  3. 17.1.1.4 Obtaining the Replication Master Binary Log Coordinates 获取复制Master Binary Log的坐标:

    17.1.1.4 Obtaining the Replication Master Binary Log Coordinates 获取复制Master Binary Log的坐标: 你需要master ...

  4. 17.1.2 Replication Formats

    17.1.2 Replication Formats 复制格式 17.1.2.1 Advantages and Disadvantages of Statement-Based and Row-Bas ...

  5. 17.1.2?Replication Formats 复制格式:

    17.1.2?Replication Formats 复制格式: 17.1.2.1 Advantages and Disadvantages of Statement-Based and Row-Ba ...

  6. 17.2.2 Replication Relay and Status Logs 复制Relay 和状态日志;

    17.2.2 Replication Relay and Status Logs 复制Relay 和状态日志: 17.2.2.1 The Slave Relay Log 17.2.2.2 Slave ...

  7. 17.2.1 Replication Implementation Details 复制实现细节:

    17.2 Replication Implementation 复制是基于master server 跟踪所有改变到他的数据库(更新,删除等等)在它的binary log. binary log 作为 ...

  8. 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: 最简单和最直接方式是设置复制使用新的 ...

  9. 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: 最简单和最直接的方法是设置复制用于使 ...

随机推荐

  1. c#常用的一些命名空间

    using System.Collections; 有ArrayList;Hashtable;Stack;Queue;DictionaryEntry;等集合 using System.Data; 访问 ...

  2. 记:mysql 连接超时解决办法

    错误描述:Timeout in IO operation 原连接字符串为:Server=182.180.50.118;port=3306;Database=test;Uid=root;Pwd=123; ...

  3. Oracle的安装

    本人所使用的数据库平台为Oracle 11g 1.下载Oracle Oracle官网即可下载Oracle平台.不过网上资源丰富,大家也可在百度云网盘找到合适的版本. 附上本人网盘里存储的各个Oracl ...

  4. 在类成员函数后面加const

    在看开源代码时,经常会看到在类的成员函数后面加const,之前了没有太关注过,近来闲来无事,就想起这件事,网上查了一下,大概明白了是怎么回事,这里引用CSDN愽文里的段话:“编译器会自动给每一个函数加 ...

  5. thinkphp 整合 ucenter

    http://xcodebox.com/2013/06/8855.html 参考 1   ucenter源码目录下 /advanced/examples/api目录 copy到thinkphp项目根目 ...

  6. x264_param_t结构

    typedef struct x264_param_t { unsigned int cpu; // CPU 标志位 int i_threads; // 并行编码多帧; 线程数,为0则自动多线程编码 ...

  7. android BitmapFacty.Options的用法

    通常我们在开发android应用程序时,在加载图片时常常需要与Bitmap打交道,一般会使用BitmapFactory中提供的相关decode方法获取: 如果一张很大的图片,我们不加处理直接decod ...

  8. easy ui tree 取复选框打勾的值

    var nodes = $('#basetree').tree('getChecked'); var cnode = ''; for ( var i = 0; i < nodes.length; ...

  9. php 遍历一个文件夹下的所有文件和子文件夹

    <?php function my_scandir($dir) { $files=array(); if(is_dir($dir)) { if($handle=opendir($dir)) { ...

  10. hadoop2——新MapReduces——yarm详解

    YARN总体上仍然是Master/Slave结构,在整个资源管理框架中,ResourceManager为Master,NodeManager为Slave,ResourceManager负责对各个Nod ...