Without talking about master/slave replication, I just want to customize which entries I see when querying the MySQL Binary-Logs with SHOW BINLOG EVENTS
. Already tried to find the same information in information_schema
and performance_schema
so that I can SELECT
on a proper table but I was unable to find it.
The available filters from the docs do not seem to allow this directly.
What I'd like is something like:
-- /!\ invalid syntax /!\ --
SHOW BINLOG EVENTS WHERE Event_type = 'Query' AND Info LIKE 'UPDATE%'
-- /!\ invalid syntax /!\ --
SHOW BINLOG EVENTS IN (SELECT Log_name FROM (SHOW BINARY LOGS))
Is there a way to achieve this?
My current workaround with the mysqlbinlog
utility (runs in MySQL Container):
cd /var/lib/mysql && while read p; do mysqlbinlog -d example_db -s /var/lib/mysql/$p | grep UPDATE; done <./mysql-bin.index; cd - > /dev/null