Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

myreplication

> 编程语言
Open source

Golang MySql binary log replication listener

194 stars0 likes1 views
WebsiteGitHub

About

Golang MySql binary log replication listener

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 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Go

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

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