How to keep row synchronization in multiple mysql databases? Preferably with a doctrine

What is, if there is, a good way to keep a string for dividing databases (possibly on different computers) in synchronization?

For clarity. I have several mysql databases that share a user table with the same schema. There is a “main” database that has its own unique schema, but contains a user table that contains all the user records. Then there are several “subordinate” databases, which for the most part use the same schema, which also contains a user table (with the same schema), which stores a subset of user records.

When an update occurs with an instance of a user record in any database, I want this change to apply to all instances of this user record in all the databases in which it is located.

I am using mysql, php5.3 and doctrine 1.2.x for orm running on ubuntu VPS servers.

+3
source share
2 answers

It looks like you are looking for MySQL replication and, in particular, replicate-do-tableto restrict slave databases to only take care of a particular table (s) from the master.

+2
source

Don't try to do this with PHP or Doctrine: look at MySQL replication to keep the subordinate database tables in sync with the master

+1

All Articles