Giter VIP home page Giter VIP logo

mysql-replication-listener's Introduction

MySQL Replication Listener

Build Status

A listener to fetch binlog from mysql server.

Reference:

Install

mysql-replication-listener uses cmake, so you need cmake first.

We use asio for socket communication, and it involes some boost libraries, so maybe you need install boost(1.47 and newer).

And then:

$ cmake . -DCMAKE_INSTALL_PREFIX=/path/to/install

$ make

$ make install

Notice

We need to make mysql server to dump binlog-stream to us, so we need REPLICATION SLAVE privilege. And We need to get master status, so we need REPLICATION CLIENT privilege.

If you want to set_position to a specified binlog-file and the position, we need to ensure the binlog-file and it's position are legal, so we need to execute "SHOW BINARY LOGS" on the server. Unfortunately, In MySQL 5.1.63 and earlier, the SUPER privilege was required to use this statement. Starting with MYSQL 5.1.64, a user with the REPLICATION CLIENT privilege may also execute this statement.

So If you use MySQL 5.1.63 and earlier, you need SUPER privilege too.

Also, We auth privilege before binlog_dump, so we will access database mysql for accout checking... That means you have to give at least READ privilege for database mysql ...

Also notice that besides log-bin and binlog-format set in mysqld section, you should also set a server-id for mysql master.

mysql-replication-listener's People

Contributors

guweigang avatar ideal avatar rami-dabain avatar wangmh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mysql-replication-listener's Issues

通过get_positon方式获取的position不能用于故障恢复

关于replication,的event_header,我们还应该暴露next_position出来
因为每次解析完数据后我们是通过调用get_position获取当前位置的,而这个是通过在服务器端执行fetch master status来实现的,这是有问题的。

我昨天试了一下,如果client处理数据较慢(事实上一定会慢,因为这就是异步),那么通过get_position获取的position会超前于client正在处理的position,也就是说,我们可能在故障恢复的时候会漏增量。

Installation problems on Ubuntu 12.04 Revision: 76

CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.8)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

在ubuntu 12/13 中无法正常使用

Hi, 在Ubuntu 12/13中,能正常编译,但是无法正常使用,同样的代码在这里会收到mysql server 的“验证错误”消息!不知道是不是因为openssl和其他一些依赖库的版本问题导致的!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.