If I have a table (lets call it orders
) on one server of mine, named, for example, local
. And I have this same table one another server of mine, na
I am solving similar problem of syncing two tables constantly.
Among all the scripts (of which most are old) I've found this actively developed app (looks promising)
https://github.com/mrjgreen/db-sync
I'll try it and maybe later I'll write an example.
pt-table-sync can do this: http://www.percona.com/doc/percona-toolkit/2.1/pt-table-sync.html
See also other SO questions and answers mentioning pt-table-sync.