mysql binlog 实时_使用 binlog 实时监控 Mysql 数据更新

2ff34e647e2e3cdfd8dca593e17d9b0a.png

上一篇文章《UDF+Trigger实时监控Mysql数据更新》介绍了用UDF+Trigger的方式来监控Mysql数据的更新,这次介绍下使用binlog监控数据更新的方法。The binary log is a set of log files that contain information about data modifications made to a MySQL server instance.

其主要有以下两个用途:主从同步

数据恢复

mysql主从同步原理 利用binlog来监控mysql数据的更新,以更新缓存。原理类似于mysql的主从同步。先简单介绍下mysql主从同步的原理:Whenever the master’s database is modified, the change is written to a file, the so-called binary log, or binlog. This is done by the client thread that executed the query that modified the database.

The master has a thread, called the dump thread, that continuously reads the master’s binlog and sends it to the slave.

The slave has a thread, called the IO thread, that receives the binlog that the master’s dump thread sen

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值