tags:

views:

516

answers:

1

we are dealing with a legacy application built on MySQL 5.0 (MyISAM). I need to know in real-time when an update, delete, or insert happens to a particular table. The 'gotcha' is that I can't change the db (i.e. write triggers) in any way. I have to use the bin log, replication or something else which is somewhat non-invasive.

We've looked at using the 'mysqlbinlog' command to parse the binary log. However, this is not real-time and we'd rather do something more event driven.

Any ideas?

+4  A: 

check MySQL Proxy. it lets you tap right in the command/response stream, and it's fully programmable in Lua. you can even modify commands in real time, if you want

Javier
We've looked at that a bit and that could work. The plan would be:1) Change the port that MySQL listens on and then setup the on MySQL's old port.2) Capture actions to our table and call some shell command.However, we'd much rather use <b>mysqlbinlog</b> in a <b>daemon</b> like way.
JJohnson