You may also want to check out SQLrelay. I've messed with it a bit in a testing environment, and it seems to do exactly what you are looking for. The documentation leaves a little to be desired, and some of the other engineers I work with seem a little worried about the stability of the group maintaining the code, but it may be worth a look:
sqlrelay.sourceforge.net