
14th April 2008, 18:57
|
|
Member
|
|
Join Date: Nov 2005
Location: Perth , Western Australia
Posts: 48
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
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
|

15th April 2008, 19:00
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
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
|

16th April 2008, 15:35
|
|
Member
|
|
Join Date: Nov 2005
Location: Perth , Western Australia
Posts: 48
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
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
|

17th April 2008, 19:51
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
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.
|

18th April 2008, 03:13
|
|
Member
|
|
Join Date: Nov 2005
Location: Perth , Western Australia
Posts: 48
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
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 ?.
Last edited by ubutux; 18th April 2008 at 03:16.
|

18th April 2008, 09:20
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
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
|

12th March 2009, 11:48
|
|
Junior Member
|
|
Join Date: Feb 2009
Location: Terrassa, Barcelona, Spain
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|

13th March 2009, 17:07
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Try this:
Code:
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST='';
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 03:41.
|
|
Recent comments
21 hours 53 min ago
1 day 4 hours ago
1 day 8 hours ago
1 day 10 hours ago
1 day 18 hours ago
2 days 3 hours ago
2 days 4 hours ago
2 days 8 hours ago
2 days 12 hours ago
2 days 13 hours ago