Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to setup a MySQL cluster setup of two servers (M1-M2). I also want to setup MySQL replication between two servers (M1-M3).

Is it possible to setup both clustering and replication as above. Is it a good idea to have a setup like this ?

I want to have server M1 and M2 in the amazon cloud and other server M3 in our datacenter.

share|improve this question
Hi Santhosh can share how you did this Mysql Clustering any document/how to or blog – Rajat Aug 26 '10 at 14:17
Do you want to configure NDB tables and another engine's tables in the same DB or when you say cluster are you referring to replication? – Warner Aug 26 '10 at 14:30
up vote 2 down vote accepted

This should be quite possible. MySQL cluster uses the NDB (Network Database) engine to "replicate" changes between the two nodes. So it does not use the binary logs at all. You can therefore setup the other server M3 to do straight binary log replication.

You could theoretically use whatever engine you wanted for M3, but beware that certain DML and most DDL will fail for certain engines (or at least behave differently). So the most robust would be to have M3 be a single node NDB instance. But you could set it up to use MyISAM or InnoDB, just realize that it could lead to issues down the road...

As for if it is a good idea, that depends. As long as the M1 -> M3 replication is a Master-Slave relationship (with M3 being the slave), I don't see the harm in that...

share|improve this answer

I've never done mySQL replication or clustering, so this post is just a "for what it's worth" post. If I were setting this up, and have clustering AND replication, then I would made the "cluster" master-master replicate and then the second "cluster" would be the slaves setup as master-master. So basically cluster CL1 has 2 mySQL servers, setup using master-master replication (so they both have the same data). Then for cluster #2, CL2, I'd setup as the "slave" servers that get replicated from CL1, but again, they would be setup as master-master replication so that all of THOSE in THAT cluster all have the same data, since it is a cluster.

However, this might not be how mySQL replication and clustering works. Hopefully I don't get a downvote, since I'm just giving you my 2 cents about how I would do it. Again, I've never done this and I've thought about it, but no needed to, and most of our companies databases are Oracle.

share|improve this answer
Actually, after further research, maybe you shouldn't do replication AND clustering; again not sure, since I don't know what the "correct" thing to do here. However, there's a good writeup on mySQL clustering -… – drewrockshard Aug 26 '10 at 14:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.