gpt4 book ai didi

mysql - 如何读取mysql binlog

转载 作者:行者123 更新时间:2023-11-28 23:59:03 28 4
gpt4 key购买 nike

我想编写一个服务来跟踪 mysql bin 日志以获取有关数据库更改的通知。

有没有开源的库可以读取和解析ROW格式的mysql bin log?

最佳答案

使用mysqlbinlog

The server's binary log consists of files containing “events” that describe modifications to database contents. The server writes these files in binary format. To display their contents in text format, use the mysqlbinlog utility. You can also use mysqlbinlog to display the contents of relay log files written by a slave server in a replication setup because relay logs have the same format as binary logs.

来源:https://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog.html

关于mysql - 如何读取mysql binlog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30609025/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com