笔记:mysql主从复制延迟检查

1,查看从库状态

Slave_IO_State: Waiting for master to send event       
Master_Log_File: mysql-bin.008829                ---当前master的binlog    
Read_Master_Log_Pos: 7212816                     ---master binlog位置         
Relay_Log_File: PVLBI-MySQL2-relay-bin.020559
Relay_Log_Pos: 507636268   
Relay_Master_Log_File: mysql-bin.008641          ----当前salve同步到的master的binlog日志 
Slave_IO_Running: Yes       
Slave_SQL_Running: Yes             
Last_Errno: 0            
Last_Error:    
Exec_Master_Log_Pos: 507636055                    -----当前slave执行到的master的binlog 的pos 
Relay_Log_Space: 206695473786   
Seconds_Behind_Master: 1905909                    ---延迟 s 一般是Read_Master_Log_Pos-Exec_Master_Log_Pos

三个重要指标

Relay_Master_Log_File: mysql-bin.008641  
Exec_Master_Log_Pos: 507636055
Relay_Log_Space: 4139172581

2,从主库查看数据库在做什么

mysqlbinlog -vvv --base64-output=decode-rows -j 507636055 mysql-bin.008641 | more

或进入数据库查看

 show binlog events in 'mysql-bin.008641' from 507636055 limit 10;
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值