MySQL Master-Master-Slave-Slave Replication
Satya Prakash 46 Comments Here we are going to create a Master -> Master -> Slave -> Slave replications architecture. database_structure I am expecting here, in this example we have 2. Now restart MySQL. Master 2 (Slave 1) Modify your MySQL config file. Add the following in [mysqld] [mysqld] server-id=2 auto_increment_offset=2 auto_increment_increment=2 lo, it does as the name suggests - offsets the auto increment value. auto_increment_increment should be set to the number of servers you have as masters, located in /etc directory. (vi /etc/my.conf) Add the following lines to [mysqld] [mysqld] server-id=1 auto_increment_offset=1 auto_increment_increment=2 log-bin binlog-ignore-db=mysql binlog-ignore-db, MySQL Master-Master-Slave-Slave Replication, under [mysqld] put the following [mysql] server-id=4 master-host = 10.1.1.2 master-user = replication master-password = password master-port = 3306 Save and restart MySQL. Open a MySQL prompt and run , under [mysqld] put the following [mysqld] server-id=3 master-host = 10.1.1.1 master-user = replication master-password = password master-port = 3306 Save and restart MySQL. Open a MySQL prompt and run, usually named my.cnf or mysql.cnf, you have MySQL installed and set-up as normal. Master 1 will be known as Master 1 and Slave 2 with IP 10.1.1.1 Master 2 will be known as Master 2 and Slave 1 with IP 10.1.1.2 Slave 1 will be known as
Here we are going to create a Master -> Master -> Slave -> Slave replications architecture. I am expecting here , you
Read more