Slave_IO_State: Waiting for master to send event
                  Master_Host: 10.1.1.1
                  Master_User: rep_user
                  Master_Port: 3306
                Connect_Retry: 10
              Master_Log_File: binlog.000026
          Read_Master_Log_Pos: 446
               Relay_Log_File: relay.000008
                Relay_Log_Pos: 589
        Relay_Master_Log_File: binlog.000026
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 0
                   Last_Error: 
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 446
              Relay_Log_Space: 878
              Until_Condition: None
               Until_Log_File: 
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File: 
           Master_SSL_CA_Path: 
              Master_SSL_Cert: 
            Master_SSL_Cipher: 
               Master_SSL_Key: 
        Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 0
               Last_SQL_Error: 
  Replicate_Ignore_Server_Ids: 
             Master_Server_Id: 2211
 
Master_Log_File: binlog.000026,对应读取的master二进制文件
Read_Master_Log_Pos: 446        读到了哪个位置
Relay_Master_Log_File: binlog.000026 重放的二进制文件,对应master二进制文件
Exec_Master_Log_Pos: 446 重放到了哪个位置
Relay_Log_File: relay.000008         保存的中继日志
Relay_Log_Pos: 589                   读取中继日志,到了哪个位置
Slave有两个线程,I/O线程从Master接收二进制日志文件,写入本地的中继日志,SQL线程,读取中继日志,重放。典型的生产者/消费者模型。
中继日志有三个位置:I/O从Master读到了哪个位置,SQL执行中继日志,执行到了哪个位置,重放之后,会有一个位置对应Master上面的二进制文件位置。
Read_Master_Log_Pos和Exec_Master_Log_Pos相等,说明没有需要重放的内容了。
Read_Master_Log_Pos与Master 上面的show master status 位置相等,说明没有需要读取的内容,二者已经完全同步。
特别注意:Seconds_Behind_Master不是表示Slave比Master落后多少,而是对于SQL线程,中继日志中还有多少没有执行。
Seconds_Behind_Master=0 不表示Slave与Master完全同步,而是中继日志执行完了。要判断是否完全同步,还需要判断Master记录到了哪个位置和Slave读到了哪个位置。
注:在Master可以并发的查询,但是在Slave只能串行执行,因为Slave只有一个SQL线程重放中继日志,这会成为瓶颈。

show slave status的更多相关文章

  1. show master/slave status求根溯源

    show master/slave status分别是查看主数据库以及副数据库的状态,是一种能查看主从复制运行情况的方式. 这里仅仅讨论linux下的nysql5.7.13版本的执行情况 一.show ...

  2. 两主机搭建MySQL主从复制后,show slave status显示:Last_IO_Error: error connecting to master ……

    两台主机A.B搭建mysql主从复制关系(A为master,B为slave)后,在slave上执行show slave status,结果中显示Last_IO_Error: error connect ...

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

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

  4. show slave status中的log_file / log_pos

    在MySQL的master-slave或dual master的架构中,我们经常使用show slave status命令来查看复制状态. 这里涉及几个重要的日志文件和位置: Master_Log_F ...

  5. mysql----show slave status \G 说明

    show slave status \G 可以用来查看mysql 的复制状态,有些列名所表达的意思不太明确,现整理如下: 1. Slave_IO_State:ID线程的状态,如果master 的所有变 ...

  6. [置顶] 两主机搭建MySQL主从复制后,show slave status显示:Last_IO_Error: error connecting to master ……

    两台主机A.B搭建mysql主从复制关系(A为master,B为slave)后,在slave上执行show slave status,结果中显示Last_IO_Error: error connect ...

  7. MySQL show master / slave status 命令参数

    一.show master status 二.show slave status Slave_IO_State SHOW PROCESSLIST输出的State字段的拷贝.SHOW PROCESSLI ...

  8. MySQL show slave status命令参数

    ? Slave_IO_State SHOW PROCESSLIST输出的State字段的拷贝.SHOW PROCESSLIST用于从属I/O线程.如果线程正在试图连接到主服务器,正在等待来自主服务器的 ...

  9. Python执行show slave status输出的两个格式

    1.元组的方式 输出格式如下: ('Waiting for master to send event', '10.75.19.79', 'mysqlsync', 5580L, 60L, 'mysql- ...

  10. show master status, show slave status中的Executed_Gtid_Set

    slave 如果server是slave节点,在server上执行show master staus与show slave status显示的Executed_Gtid_Set是一样的. slave也 ...

随机推荐

  1. Greenplum迁移到配置不同的GP系统

    要使用gp_restore或gpdbrestore并行恢复操作,恢复的系统必须与备份的系统具有相同的配置(相同数量的Instance).如果想要恢复数据库对象和数据到配置不同的系统(比如系统扩展了更多 ...

  2. UWP开发入门系列笔记之(一):UWP初览

    标签: 随着微软Build2015带来的好消息,Win10正式版发布的日子已经离我们越来越近了,我们也终于欣喜地看到:一个统一的Windows平台对于开发人员来说充满了吸引力,这局棋下的好大的说--于 ...

  3. Linux是如何管理内存的

    物理内存的管理 Linux管理物理内存是使用分页机制实现的.为了使分页机制在32位和64位体系结构下高效工作,Linux采用了一个四级分页策略. Linux支持多种内存分配机制.分配物理内存页框的主要 ...

  4. HDU(1175),连连看,BFS

    题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1175 越学越不会,BFS还是很高级的. 连连看 Time Limit: 20000/100 ...

  5. 修改idea的运行内存

    1.如果本地的jdk是32位的,那么最大的内存只能支持到1024 2.测试jdk位数 public class Test { public static void main(String[] args ...

  6. 电脑能上网,手机连上wifi不能上网

    电脑能上网,手机连上wifi不能上网  ,其实只要把手机的dhcp 改为我们熟悉的就行了 我此处就设置为114.114.114.114

  7. nginx 网站目录重写

    rewrite ^/en/ /en.php last;rewrite ^/en /en.php last;

  8. ruby学习总结05

    1.数值类(Numeric) 有理数:Rational(分子,分母) 复数:Complex(实数,虚数) 随机数:Rnadom   rand()  返回比1小的浮点数,rand(种子数)  返回0到该 ...

  9. QCom MSM MDP显示驱动一些点的简记

    简要记录了Qualcom MSM8xxx MDP Framebuffer驱动中的一些点. Framebuffer设备的sysfs 330static int msm_fb_create_sysfs(s ...

  10. js将数组元素随机排序的方法

    在群里看见的一个面试题,试了一下,还是可以做出来的,但是需要查资料,主要是岁一些方法了解的不清楚,可能这个跟我平时不太注重基础理论有关系,像什么构造函数啊,我根本就不关心什么叫构造函数,我一直都以为我 ...