All Projects → fengxiangyun → mysql-replication

fengxiangyun / mysql-replication

Licence: other
mysql replication binlog php 同步工具

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to mysql-replication

Seamless database pool
Add support for master/slave database clusters in ActiveRecord to improve performance.
Stars: ✭ 222 (+270%)
Mutual labels:  replication
radiusd
Distributed Radius-server to do authentication+accounting.
Stars: ✭ 50 (-16.67%)
Mutual labels:  replication
kunlun-storage
Kunlun-storage is the storage component for KunlunBase. It's developed based on percona-mysql-8.0.x and contains exclusive features used by KunlunBase, performance enhancements and XA transaction crash safety enhancements without which MySQL would not be able to execute XA transactions reliably under error conditions such as power outage, proces…
Stars: ✭ 2 (-96.67%)
Mutual labels:  replication
Reopenldap
Production-ready replacement for OpenLDAP with robust multi-master replication
Stars: ✭ 242 (+303.33%)
Mutual labels:  replication
itc.lua
A Lua implementation of Interval Tree Clocks
Stars: ✭ 21 (-65%)
Mutual labels:  replication
backbeat
Zenko Backbeat is the core engine for asynchronous replication, optimized for queuing metadata updates and dispatching work to long-running tasks in the background.
Stars: ✭ 51 (-15%)
Mutual labels:  replication
Vasto
A distributed key-value store. On Disk. Able to grow or shrink without service interruption.
Stars: ✭ 206 (+243.33%)
Mutual labels:  replication
asyncmy
A fast asyncio MySQL/MariaDB driver with replication protocol support
Stars: ✭ 126 (+110%)
Mutual labels:  replication
vrrm
rough code for running consensus
Stars: ✭ 18 (-70%)
Mutual labels:  replication
Recon
HA LDAP based key/value solution for projects configuration storing with multi master replication support
Stars: ✭ 12 (-80%)
Mutual labels:  replication
Acid State
Add ACID guarantees to any serializable Haskell data structure
Stars: ✭ 246 (+310%)
Mutual labels:  replication
ldb
Replication of CRDTs
Stars: ✭ 37 (-38.33%)
Mutual labels:  replication
django-clone
Controlled Django model instance replication.
Stars: ✭ 89 (+48.33%)
Mutual labels:  replication
Litestream
Streaming replication for SQLite.
Stars: ✭ 3,795 (+6225%)
Mutual labels:  replication
Active Directory Scripts
Making my local storage of useful AD Scripts available to everyone.
Stars: ✭ 46 (-23.33%)
Mutual labels:  replication
Php Mysql Replication
Pure PHP Implementation of MySQL replication protocol. This allow you to receive event like insert, update, delete with their data and raw SQL queries.
Stars: ✭ 213 (+255%)
Mutual labels:  replication
pglogrepl
PostgreSQL logical replication library for Go.
Stars: ✭ 150 (+150%)
Mutual labels:  replication
pgcapture
A scalable Netflix DBLog implementation for PostgreSQL
Stars: ✭ 94 (+56.67%)
Mutual labels:  replication
docker-mysql-replication
master master & master slave replication in mysql
Stars: ✭ 33 (-45%)
Mutual labels:  replication
data-transfer-hub
Seamless User Interface for replicating data into AWS.
Stars: ✭ 102 (+70%)
Mutual labels:  replication

php-mysql-replication

参考python版本:https://github.com/noplay/python-mysql-replication

运行环境

目前只支持数据库utf8编码
php版本>=5.4
mysql版本>=5.1
需要安装php sockets扩展
运行用户需要有创建文件的权限

Config.php 配置文件

运行run.php 目前只支持row模式
项目中 可以用supervisor监控 run.php 进程
Connect::analysisBinLog bool true存储当前的file pos
本例中 通过读取binlog存储到kafka中 kafka版本 0.8.2.0
kafka-client 用到了github开源的一个项目 https://github.com/nmred/kafka-php
BinLogPack.php打印了事件类型

配置mysql,打开mysql的binlog,配置binlog格式为row

log-bin=mysql-bin
server-id=1
binlog_format=row

持久化

file-pos 保存了当前读取到binlog的filename和pos,保证程序异常退出后能继续读取binlog
新项目运行时 要删除file-pos,从当前show master status,读取到的filename pos开始读取
可以设置file-pos,程序则从当前设置的位置读取binlog

流程

image

联系我

任何问题可以mail
[email protected]
QQ:838⑤91688

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].