百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

myreplication

> 编程语言
开源

Golang MySQL 二进制日志复制监听器

194 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Golang MySQL 二进制日志复制监听器

Go MySql binary log replication listener

Pure Go Implementation of MySQL replication protocol. This allow you to receive event like insert, update, delete with their datas and raw SQL queries. This code has been developed and maintained by Ven at January 2015.

Installation

bash
go get github.com/2tvenom/myreplication

Test

The project is test with:

  • Go 1.3.3
  • MySQL 5.5, 5.6 and 5.7 (beta)
  • Docker 1.4.1 build 5bc2ff8 (functional tests)

It's not tested in real production situation.

Unit tests

bash
go test

Docker tests

Functonal tests with Docker. Test statement based and row based replication. MySql versions 5.5, 5.6, 5.7.

bash
cd tests
sudo ./test.sh

MySQL server settings

In your MySQL server configuration file you need to enable replication:

[mysqld]
server-id		 = 1
log_bin			 = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size  = 100M
binlog-format    = row #Row based replication

Example

…

Links

  • MySql documentation http://dev.mysql.com/doc/internals/en/client-server-protocol.html
  • Python implementation. MySql 5.6 checksum compatibility https://github.com/noplay/python-mysql-replication
  • Go MySql client. Password encryption method https://github.com/ziutek/mymysql
  • Java implementation. Decimal type parsing https://github.com/whitesock/open-replicator
  • Ruby implementation. Decimal type parsing https://github.com/jeremycole/mysql_binlog
  • Docker files https://github.com/docker-library/mysql

Licence

WTFPL

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言