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. Nuget 自动上传

    1:参考https://newnugetpackage.codeplex.com/wikipage?title=NuGet%20Package%20To%20Create%20A%20NuGet%20 ...

  2. Hibernate注解错误之- org.hibernate.MappingException: Could not determine type for:

    Hibernate 注解 @OneToOne 时候,出现以下错误,经调试,发现 注解要么全部放在字段上,要么全部放在get方法上,不能混合使用! org.hibernate.MappingExcept ...

  3. c++ 学习之const专题之const成员函数

    一些成员函数改变对象,一些成员函数不改变对象. 例如: int Point::GetY() { return yVal; } 这个函数被调用时,不改变Point对象,而下面的函数改变Point对象: ...

  4. asp.net:repeater嵌套(常用于新闻等在首页归类显示)

    using System;using System.Configuration;using System.Collections.Generic;using System.Linq;using Sys ...

  5. C#基础整理

    元旦整理书架发现一本小册子——<C#精髓>中国出版社2001年出版的,粗略翻了下关于C#的知识点挺全的虽然内容谈得很浅也有很多过时的内容(话说这本书是我在旧书店花5块钱淘的)我保留原有章节 ...

  6. java新手笔记9 类的封装示例

    1.bank类 package com.yfs.javase; //类封装 public class BankCard { //属性 int balance;//默认0 实例变量 分配给每个对象一个 ...

  7. Flexbox盒子弹性布局

    Can I Use? 2. 概念: 当你给一个元素使用了flexbox模块,那么它的子元素就会指定的方向在水平或者纵向方向排列.这些子元素会按照一定的比例进行扩展或收缩来填补容器的可用空间. < ...

  8. 深度优化LNMP之PHP (转)

    深度优化LNMP之PHP   PHP缓存加速介绍   1.操作码介绍及缓存原理     当客户端请求一个php程序时,服务器的PHP引擎会解析该PHP程序,并将其编译为特定的操作码文件(Operate ...

  9. Php之Http请求urlencode/rawurlencode

    在http请求中,如果参数值带中文最好使用urlencode/rawurlencode函数. 如果参数值中带加号也最好使用,否则后台接收时,+号变成空格,引起不必要的麻烦. 注:urlencode和r ...

  10. CSS三角形广告文字

    街上经常碰到一些发各类广告传单的,有一次收到一张房地产广告的传单,顺手留下来,看着里面有些广告挺吸引人,同时也想练练自己css技术,故抽空做了一下. 原图某区域如下: 实现上图效果是需要一些想象力的, ...