title: How to filter output of "SHOW BINLOG EVENTS"
body: <p>Without talking about master/slave replication, I just want to customize which entries I see when querying the MySQL Binary-Logs with <code>SHOW BINLOG EVENTS</code>. Already tried to find the same information in <code>information_schema</code> and <code>performance_schema</code> so that I can <code>SELECT</code> on a proper table but I was unable to find it.</p>
  
  <p>The available filters <a href="https://dev.mysql.com/doc/refman/5.6/en/show-binlog-events.html" rel="noreferrer">from the docs</a> do not seem to allow this directly.</p>
  
  <p>What I'd like is something like:</p>
  
  <pre class="lang-sql prettyprint-override"><code>-- /!\ invalid syntax  /!\ --
  SHOW BINLOG EVENTS WHERE Event_type = 'Query' AND Info LIKE 'UPDATE%'
  </code></pre>
  
  <pre class="lang-sql prettyprint-override"><code>-- /!\ invalid syntax  /!\ --
  SHOW BINLOG EVENTS IN (SELECT Log_name FROM (SHOW BINARY LOGS))
  </code></pre>
  
  <p>Is there a way to achieve this?</p>
  
  <hr>
  
  <p>My current workaround with the <code>mysqlbinlog</code> utility (runs in <a href="https://hub.docker.com/_/mysql" rel="noreferrer">MySQL Container</a>):</p>
  
  <pre class="lang-sh prettyprint-override"><code>cd /var/lib/mysql &amp;&amp; while read p; do mysqlbinlog -d example_db -s /var/lib/mysql/$p | grep UPDATE; done &lt;./mysql-bin.index; cd - &gt; /dev/null
  </code></pre>