Skip to content
This repository has been archived by the owner. It is now read-only.
A fast mysql binlog parser
Branch: master
Clone or download
dnephin Merge pull request #9 from brandt/fix_strndup
Bump _XOPEN_SOURCE to 700 for strndup()
Latest commit 1f5c968 Mar 10, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
build linking order fix Feb 27, 2015
src Bump _XOPEN_SOURCE to 700 for strndup() Nov 20, 2014
tests Fixed bug with delayed replication events. Jul 30, 2013
.gitignore Add python build script. Aug 6, 2014
license.txt improve documentation, expose other fns to python Sep 22, 2011 Remove python package version duplication. Aug 14, 2014
ybinlogp.pth further move files into package. Jul 29, 2013
ybinlogp.spec Adding RPM spec. Aug 30, 2013

ybinlogp - a fast mysql binlog parsing utility

ybinlogp is a mysql utility for analyzing mysql binlogs. It provides a library, libybinlogp, which has a really terrible build system, a little tool documented below which uses this library, and a python-ctypes wrapper that exposes some critical functionality (namely, opening a binlog, reading from it, and handling query, xid, and rotate events).


ybinlogp [options] binlog-file


  • -o OFFSET Find events after a given offset
  • -t TIME Find events after a given unix timestamp
  • -a NUMBER Print N events after the given one (accepts 'all')
  • -D DBNAME Filter out query statements not on database DBNAME
  • -q Be quieter (may be specified multiple times)
  • -h Show help


If you have a replicated MySQL instance, you're probably used to ocassionally seeing it freak out. ybinlogp lets you just put in a time or offset and see exactly what was going on around then. Compare this to the default mysql binlog parser, which uses the linked list feature in the binlogs and so is uselessly slow when dealing with anything past the first few events (and also doesn't have a time search feature; how often do you actually know what the offset of an event is?)


ybinlogp was developed by some engineers at Yelp for use with their MySQL installation. The initial development was done by James Brown (; Evan Klitzke ( worked on some bugfixes and a partially-complete Python API, and Eskil Olsen ( has a branch that does some crazy stuff with Boost.


It's Github... Fork away!


This work is available under the ISC (OpenBSD) license. The full contents are available as license.txt

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.