So, you have a binlog. You want to find out something specific
that happened inside of it. What to do? mysqlbinlog
has some neat features, which I thought we would look at here.
I should first explain what mysqlbinlog really is.
It is a tool that lets you analyze and view the binlogs/relaylogs
from mysql, which are stored in binary format. This tool converts
them to plaintext, so that they’re human-readable.
For the first tip, let’s start with the
--read-from-remote-server option, which allows you
to examine a binlog on a master server in order, perhaps, to dump
it onto your slave and compare master/slave logs for potential
problems*.
$ mysqlbinlog --read-from-remote-server -uwesterlund -p mysql-bin.000001 -h 127.0.0.1 -P 3306 | head -5 Enter password: /*!40019 SET …[Read more]