This is the scenario:
One local program A stores data in a local MySQL 5.x database Db_A.
Other remote program B stores data in a remote MySQL 5.x database Db_B.
The programs and databases are different but they are sharing the same stock of products, categories, etc. That's why I need to keep both of them updated if the other one changes. There is no date column in the products/categories tables (no column to register the insert/update/delete).
If the program A adds/modifies/deletes a product in database Db_A, I need to update the equivalent tables in the remote database Db_B. Same as reverse (Remote->Local). But It's not necessary to do it in real-time. I need a sync script that could check for differencies, and could update both databases, I don't want to modify the programs. Just a script that could be called to execute the sync between the tables.
How should I do it? I'm running Windows on local server and the program A is running here. I can access the remote database (of Product B) from local server. I prefer to code in PHP, Python.
Thanks very much.