MySQL Forums
Forum List  »  General

Multi Master - Single Slave - Configuration?
Posted by: Max Ziegler
Date: March 11, 2011 06:05AM

Hello,

i try to build up a configuration where databases (with different names) on different Servers will be syncronised (only in one direction) with one Server.
My question: is this possible with the replication feature?

overview:

Server 1 [db1]
Server 2 [db2] --> Server 4 [db1, db2, db3]
Server 3 [db3]

the arrow shows the data flow. On Server 4 only read processes will be used.

My thoughts:
I configure Server 1 - 3 as replication masters and the server 4 as slave, and use a script which switch the connection to the server each 5 minutes with the command slave stop; CHANGE MASTER TO ... slave start;
with the PARAMETER
MASTER_LOG_FILE='server<1-3>-log', RELAY_LOG_FILE='server<1-3>-relay';

But this doesnt work.
Error msg: ERROR 1380 (HY000): Failed initializing relay log position: Could not find target log during relay log initialization
error_log on slave:
110311 11:57:04 [ERROR] Error reading packet from server: Could not find first log file name in binary log index file ( server_errno=1236)
110311 11:57:04 [ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file', Error_code: 1236

If I remove the Parameters, he will start at position 0 at the bin-log file and re-enter all entries.

So do i have to write a script which remebers the position from the *.index file and set the parameter MASTER_LOG_POS?

Or is it easier to start 3 instances of slave-servers on server 4?

Or is there any other tool which fits better? (like clustering?)

Thanks a lot, max



Edited 1 time(s). Last edit at 03/11/2011 06:31AM by Max Ziegler.

Options: ReplyQuote


Subject
Written By
Posted
Multi Master - Single Slave - Configuration?
March 11, 2011 06:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.