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

17.2.2.1 The Slave Relay Log
17.2.2.2 Slave Status Logs 在复制过程中,一个slave server 创建几个logs 持有binary log events 中继从master 到slave, 记录信息关于当前的状态和位置 在relay log里, 有3种类型的日志 如下: 1.relay log 包含events 从master的binary log 读取 通过slave I/O thread写入。 Events 在relay log 是在slave上呗执行作为SQL thread 的一部分 2. master info log 包含了状态和当前配置信息 对于slave连接到master. log 持有的信息关于master host name, login credentials, coordinates 表明slave 已经从master的binary log读取多远 在MySQL 5.6之前,这个log总是一个文件(master.info),但是在MySQL 5.6和以后版本, 这个日志可以写入到mysql.slave_master_info代替文件,通过--master-info-repository=TABLE mysql> select * from mysql.slave_master_info\G;
*************************** 1. row ***************************
Number_of_lines: 23
Master_log_name: mysql-bin.000017
Master_log_pos: 234940920
Host: 192.168.11.186
User_name: backup
User_password: kjk7787czcb
Port: 3306
Connect_retry: 60
Enabled_ssl: 0
Ssl_ca:
Ssl_capath:
Ssl_cert:
Ssl_cipher:
Ssl_key:
Ssl_verify_server_cert: 0
Heartbeat: 1800
Bind:
Ignored_server_ids: 0
Uuid: d6881046-9be4-11e6-8b6a-0050568a6b1d
Retry_count: 86400
Ssl_crl:
Ssl_crlpath:
Enabled_auto_position: 0
1 row in set (0.00 sec) ERROR:
No query specified relay log info log 持有状态信息关于在slave的relay log的执行点 在MySQL 5.6之前,日志总是一个文件(relay-log.info),但是在MySQL 5.6和以后版本, 日志可以写入到mysql.slave_relay_log_info 表带人体文件通过with --relay-log-info-repository=TABLE. mysql> select * from mysql.slave_relay_log_info\G;
*************************** 1. row ***************************
Number_of_lines: 7
Relay_log_name: ./mysqld-relay-bin.000007
Relay_log_pos: 235865893
Master_log_name: mysql-bin.000017
Master_log_pos: 235865730
Sql_delay: 0
Number_of_workers: 0
Id: 1
1 row in set (0.00 sec) ERROR:
No query specified 在MySQL 5.6中,设置relay_log_info_repository and master_info_repository to 为TABLE 可以改善意外Hash的恢复能力。 从5.6.6开始,那些表是使用InnoDB表 在MySQL 5.6.5和早期版本,slave_master_info and slave_relay_log_info tables 默认是使用MyISAM 这以为这你需要在启动复制前改变存储引擎通过执行ALTER TABLE ... ENGINE=InnoDB ALTER TABLE mysql.slave_master_info ENGINE=InnoDB;
ALTER TABLE mysql.slave_relay_log_info ENGINE=InnoDB; 注意: 不要尝试更新或者插入lave_master_info or slave_relay_log_info table 表手动的, 这么做会导致未定义的行为,是不支持的

17.2.2 Replication Relay and Status Logs 复制Relay 和状态日志;的更多相关文章

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

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

  2. 17.1.1.8?Setting Up Replication with Existing Data设置复制使用存在的数据

    17.1.1.8?Setting Up Replication with Existing Data设置复制使用存在的数据 当设置复制使用存在的数据,你需要确定如何最好的从master 得到数据到sl ...

  3. mysqladmin processlist; show processlist/status/open tables/engine/variables/table status/columns/grants/index/privileges/innodb status/logs/warnings/////; 结果筛选

    mysqladmin showprocesslist可查看完整sql需要权限. SHOW PROCESSLIST显示哪些线程正在运行.您也可以使用mysqladmin processlist语句得到此 ...

  4. 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 ...

  5. 17.1.2 Replication Formats

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

  6. 17.1.1.3 Creating a User for Replication 创建一个用于用于复制:

    17.1.1.3 Creating a User for Replication 创建一个用于用于复制: 每个slave 连接到master 使用一个MySQL 用户名和密码, 因此必须有一个用户账户 ...

  7. 17.1.2?Replication Formats 复制格式:

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

  8. 【docker】docker部署spring boot服务,但是docker logs查看容器输出控制台日志,没有日志打印,日志未打印,docker logs不打印容器日志

    如题: docker部署spring boot服务,但是docker logs查看容器输出控制台日志,没有日志打印,日志未打印,docker logs不打印容器日志 场景再现: docker部署并启动 ...

  9. 从show slave status 中判断mysql同步状态

    slave status 中检查同步状态: 1.sql线程和io线程显示yes Slave_IO_Running: Yes Slave_SQL_Running: Yes 2. Master_Log_F ...

随机推荐

  1. Android 在子线程中更新UI

    今天在做练习时,在一个新开启的线程中调用“Toast.makeText(MainActivity.this, "登陆成功",Toast.LENGTH_SHORT).show();” ...

  2. Linux中tshark(wireshark)抓包工具使用方法详解

    在Linux下,当我们需要抓取网络数据包分析时,通常是使用tcpdump抓取网络raw数据包存到一个文件,然后下载到本地使用wireshark界面网络分析工具进行网络包分析.最近才发现,原来wires ...

  3. 时间处理总结(三)javascript与WCF

    1.WCF提交时间时,若需接受DateTime需转换为"\/Date(928120800000+0800)\/"这种格式 var DateToJson = function (js ...

  4. Flexbox盒子弹性布局

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

  5. 01_JavaMail_03_邮件发送简单实例

    [JavaMail中的核心类] 1.Session:类似Jdbc中的Connection的作用 2.MimeMessage:邮件信息类 3.Transport:发送器,用来发送邮件 [工程截图] [具 ...

  6. UVA 10739 String to Palindrome(动态规划 回文)

    String to Palindrome 题目大意:给出一个字符串s,现在可以进行3种操作(添加字母,删除字母,替换字母),将其变成回文串,求出最少的操作次数.比如abccda,可以用删除操作,删除b ...

  7. zoj1873 Let it Bead

    思路:polya裸题,如果是旋转,对于旋转i格的循环节长度len=lcm(i,n)/i,个数就是n/len=gcd(i,n):如果是翻转,奇数个点对称轴就是一个点一条边,那么循环节个数即n/2+1, ...

  8. Dynamic Programming: From novice to advanced

    作者:Dumitru 出处:http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=dynProg An impo ...

  9. ubuntu上 安装 基于sphinx 的 coreseek 全文搜索

    原生sphinx不支持中文, sphinx-for-chinese匹配中文时也不返回结果 ,真纠结,  最好试了 coreseek,这个能正确返回结果了, 所以记录一下 1 http://www.co ...

  10. 【DP_树形DP专题】题单总结

    转载自 http://blog.csdn.net/woshi250hua/article/details/7644959#t2 题单:http://vjudge.net/contest/123963# ...