You can use MySQL replication to achieve this. However beware of Primary auto incrementing keys, and other keys which may conflict.
e.g. Simultaneous inserts
entry 1 -> db 1 , with primary auto key = 1
entry 1 -> db 2 , with primary auto key = 1
==> replicate db 1 to db 2 = ERROR!
==> replicate db 2 to db 1 = ERROR!
To avoid this you need to need to set the auto_incrementing key to jump numbers. i.e. entries in db1 start at 1 and have an increment of 2, and entries in db2 start at 2 and have an increment of 2.
Therefore the above scenario
entry 1 -> db 2 , with primary auto key = 2
I'm only talking about theory here and have never applied the above to real life DB application.