Github: https://github.com/noplay/python-mysql-replication
设置同步账号权限
GRANT SELECT, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'replicator'@'%' IDENTIFIED BY '123456'; # 刷新权限 flush privileges;
参考
利用Python my-replication读取mysql的binlog
安装
pip install mysql-replication
代码示例
</div>