I am going to setup two MySQL servers in a single-master replication environment: one server (master) receives all the write statements, while the other (slave) receives all the read statements. If the master goes down, the slave can take over its job temporarily until the master is restored.
Only one database is replicated between the two servers, not the whole MySQL data.

Using Drupal, I built a portal to access the data in the MySQL databases. For redundancy purposes, I need to run Drupal on both MySQL servers (master and slave), to keep the service up even if one of the machines goes down.
Drupal uses the existing MySQL servers to keep its own configuration in a separate database, which is not replicated.

The problem is, it's kind of hard to keep two Drupal sites exactly in sync, with all the settings, user accounts, not to mention the content.
So, I thought, would it be possible to just enable replication for the Drupal database too? If it works correctly, this should propagate to the slave any changes I do to Drupal on the master.

Are there any issues with running two Drupal sites like this, on a master-slave pair of MySQL servers? Is there anything bad that could happen if I enable replication between the Drupal databases? Keep in mind that only one Drupal site is going to be used at any given time, never both at the same time.

Comments

ardas’s picture

I also need this!
As I know there should be a replication tool for any SQL server. Oracle, MSSQL, Postgre SQL should have their own built in tools. Not sure is there any built in solution for MySQL.

I will do some research soon.
----------------
Regards,
Dmitry Kresin, ARDAS group - Web site development, Drupal services, Software development, IT outsourcing.