Comments on Setting Up Master-Master Replication With MySQL 5 On Debian Etch

Setting Up Master-Master Replication With MySQL 5 On Debian Etch Since version 5, MySQL comes with built-in support for master-master replication, solving the problem that can happen with self-generated keys. In former MySQL versions, the problem with master-master replication was that conflicts arose immediately if node A and node B both inserted an auto-incrementing key on the same table. The advantages of master-master replication over the traditional master-slave replication are that you don't have to modify your applications to make write accesses only to the master, and that it is easier to provide high-availability because if the master fails, you still have the other master.

6 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: tom schuring

Hello,

will this work on a third server as well or is this limited to 2 machines ?

thanks,
tom

By: skynet

it works on multiple servers.. just make relevant settings on the third server.

By: Fernando Ducloux

Do we have to specify every single database that we want replicated? isn't there any way to have all DBs replicated automatically?

 thanks!

By:

I use MySQL server 5.0.77. With the line

log-bin = /var/log/mysql/mysql-bin.log

I always got error related to deprecated config, use change master instead.

After some searching, I replace that config with 

log-bin =  mysql-bin

from http://www.ovaistariq.net/565/setting-up-master-slave-replication-with-mysql/ and everything works fine now.

 Btw, how can we replicate all the databases in mysql (current and newly created) automatically?

By:

Excellent article and well written. I set up a broken master master replication. Only additional thing I had to (i think) do was to stop the existing slaves and RESET SLAVE on both servers.

Thanks very much, in realms of high availability again.

By: Balak

hello,

whatt is the status of cluster after restart the mysql!