First query the bin-log file
show master logs;
show binlog events in 'log-bin.000005' ;
cd to the binlog directory
- Query log output
mysqlbinlog --no-defaults --base64-output=decode-rows -v log-bin.000005
- grep filter
mysqlbinlog --no-defaults --base64-output=decode-rows -v log-bin.00
0005 | grep 'xxxx'
-- grep 上下10行
mysqlbinlog --no-defaults --base64-output=decode-rows -v log-bin.000005 | grep -A10 -B10 'xx'