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. Linux云主机安装JDK,配置hadoop的详细方式

    云主机我使用的是青云的,还有好多其他品牌,比如阿里云 unitedstack 等等. 注册完青云后,会有试用券发到账户,可以利用此券试用其服务. 1 首先创建好一个主机,按照提示选择好系统,创建好一个 ...

  2. 使用普通Windows服务创建Quartz.Net服务项目

    Quartz.NET 项目地址 http://quartznet.sourceforge.net/ 源码下载地址:Quartz.Net.2.0 首先创建Quartz.Net.2.0解决方案,添加 Wi ...

  3. SQL server 2012 如何取上个月的最后一天

    好吧 QQ群里被问到这种问题,还是这里写一下吧. DECLARE @date DATETIME = getdate(); SELECT EOMONTH (@date) AS 'Last Day Of ...

  4. 自动构建工具Ant的使用-笔记

    第一:什么是Ant? Apache Ant是一个基于Java的生成工具.据最初的创始人James Duncan Davidson的介绍,这个工具的名称是another neat tool(另一个整洁的 ...

  5. java新手笔记1 Hello World!

    //Hello.java文件 //类声明 public class Hello{ //声明方法 main程序入口 public static void main (String[] args) { S ...

  6. 【原创】Android开发使用华为手机调试logcat没有应用输出信息

    输入 *#*#2846579#*#* 点击project Menu点击后台 1.设置logcat 2. Dump & Log",打开开关"打开Dump & Log& ...

  7. Android LayoutInflater.inflate使用上的问题解惑

    最近在在使用LayoutInflater.inflate方法时遇到了一些问题,以前没有仔细看过此类的使用方法,故将其记录下来,方便日后查阅. 相信大家都知道LayoutInflater.inflate ...

  8. PHP 返回近7天 本月 上月日期

    <?php /** * 返回近7天,本月,上月数据 * 不计当天(展示后台数据专用) */ function weekMonthLastMonth($search_date = 'week') ...

  9. 计划任务实现定时备份mysql数据库

    1.linux平台 30 3 * * * sh /data/tools/mysqlbackup.sh  每天3点半备份数据库mysqlbackup.sh(备份最近5天的数据): #设置数据库名,数据库 ...

  10. http 和 Tcp 的区别

    http 和 tcp 的区别: Http在每一次请求结束后都会主动释放连接,因此HTTP连接是一种“短链接”,要保持客户端程序的在线状态,需要不断地向服务器端发起连接请求. TCP连接时一种“长连接” ...