My unfortunate adventure reading MySQL binlog with Ruby

Enter ruby-binlog

log-bin=mysql-bin # dump events in a file like mysql-bin.00001
binlog_format=ROW # Indicates we're interested in row based logging (https://dev.mysql.com/doc/refman/5.7/en/binary-log-setting.html)
Super useful error message

tcpdump to the rescue

#HY000 A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'mysql-bin.000007' at 852, the last event read from './mysql-bin.000007' at 123, the last byte read from './mysql-bin.000007' at 852.q
log-bin=mysql-bin
binlog_format=ROW
server_id=1
#HY000 Slave can not handle replication events with the checksum that master is configured to log; the first event 'mysql-bin.000005' at 154, the last event read from './mysql-bin.000005' at 123, the last byte read from './mysql-bin.000005' at 123.
log-bin=mysql-bin
binlog_format=ROW
server_id=1
binlog_checksum=NONE
We did it!

--

--

--

#GraphQL Enthusiast, Speaker, Senior Software Developer @ Netflix 📖 Book is now available https://book.productionreadygraphql.com/

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Flutter: Push notification with Local notifications services & FCM

Boring Tech is Better Tech

Popular backend technologies

Parkinson’s law in software testing

Ledge Grab Part 2

Lambda@Edge: run your code at CloudFront

[2021] How to upload a file or a folder to AWS S3 from GitLab CI using AWS CLI v2

5 Times Python Made Me Say WTF

WTF?! Python (head exploding and lol emojis)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Marc-André Giroux

Marc-André Giroux

#GraphQL Enthusiast, Speaker, Senior Software Developer @ Netflix 📖 Book is now available https://book.productionreadygraphql.com/

More from Medium

Introducing Obsidian 5.0, built for Deno

Two years of monorepo hand-on experience

Speed up your Jest tests with shards

Sharing scalars between modules with Chimp