views:

23

answers:

2

Is it possible to query the mysql bin log for a particular query? For example, suppose I want to know if anyone in the last hour did a specific query (like 'Update tableX where userName = 'bob'"). I just want to see if a particular query has been run recently.....

A: 

Maybe MySQL general query log can help you.

André Gadonski
Actually I already read that and only saw options for things like search by start and end time. I was hoping to avoid writing the entire multi-gigabyte bin log to disk and then having to grep it.
David
+1  A: 

Use mysqlbinlog - nix or mysqlbinlog.exe - windows

$bash>mysqlbinlog mysql_bin.log > mysql_bin.txt

After conversion You can search DML in mysql_bin.txt

iddqd