HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   mysql master to master replication question (http://www.howtoforge.com/forums/showthread.php?t=22317)

ubutux 14th April 2008 18:57

mysql master to master replication question
 
i have setup master to master replication on deb etch using the howto .It is working well with the single database i used for testing .now i would like to add the rest of the databases to this process .is there another way to add multiple db's or is best to add them one by one ? thanks

falko 15th April 2008 19:00

You must list the databases one by one in the my.cnf files, e.g.:
Code:

replicate-do-db = db1
replicate-do-db = db2
replicate-do-db = db3

binlog-do-db = db1
binlog-do-db = db2
binlog-do-db = db3


ubutux 16th April 2008 15:35

hi falko thanks again , once i add the other databases one by one to my.cnf will i need to follow the complete howto for each database ? ie: flush tables with read lock ,show master status etc i can follow the howto no problem ,i just dont fully understand this replicating process .thanks again

falko 17th April 2008 19:51

No, you need the read lock just once, and once you have that lock, you can create a dump for all databases that you want to replicate and then copy that dump to the other server.

ubutux 18th April 2008 03:13

thanks falko i will start to add the other databases locking and dumping one by one after this will add the lines for each db in my.cnf .

one other question i have is if one of the mysql servers is down for any period of time and the online server has been adding data to the database as per normal ,once server 2 comes online again will the replication be updated to server 1 current state ?.

falko 18th April 2008 09:20

That depends on how long the server is down and what you set for expire_logs_days in my.cnf. If the server is down no longer than expire_logs_days, then it should resume automatically. But you should always check that by running
Code:

SHOW SLAVE STATUS;

EricTRA 12th March 2009 11:48

Removing replication on node
 
Hello Falko,

I have a question in the other direction of master master replication. I followed your howto, combined it with specific things we needed over here and everything is working just fine.

If I want to remove replication on a server is it enough to just remove the mentioning in the my.cnf file? I imagine not :)

In other words can you tell me what actions to perform to remove a host from replication scheme? Or point me to a HowTo?

Thanks a lot and keep up the good work.

Sincerely,

Eric

falko 13th March 2009 17:07

Try this:
Code:

STOP SLAVE;
CHANGE MASTER TO MASTER_HOST='';



All times are GMT +2. The time now is 11:44.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.