MySQL Replication API - Not Maintained
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 84 commits ahead, 1 commit behind wangmh:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
include
src
.gitignore
.travis.yml
CMakeLists.txt
COPYING
README.md

README.md

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.