(a) You are mistaken. You can easily setup both as masters and then as slaves to each other. Simply enable the neccesary binary logging on both sides, then use the CHANGE MASTER TO command to set each to point at the other. Now when you do an insert or delete on either it gets replicated to the other.
(b) Its already in 4.x as described above, so yes it will be in 5.0 as well. (c) Clustering, is not supported, but you can setup a type of ring network with all updates getting sent from master->slave all the way around the ring so that all servers 2-n get all updates/deletes/inserts. The issue is detecting when a node goes down, and routing around it is a manual process. (d) Yes, see above comments. Just set them all to do binary logging, if you want to have a ring rather than a dual master pair you should set the log-slave-updates option so that each server logs not only its own updates, but those it recieves from its master. (e) If you had just a one way master->slave relationship and you delete data on the slave, that is very bad. The slave is now not the same as the master, the record will not be re-inserted, if you go to update the record on the master, when the command gets replicated to the slave an error will generat and replication will halt awaiting you to manually fix it. However, if you have setup a master/slave pair where replication goes both ways as described in (a) or a ring as described in (c) then you have no issue as all servers will be kept consistent. John McCaskey On Tue, 2004-10-12 at 21:19 +0200, Frank Fischer wrote: > Hi > > i'm using MySQL version 4.0.20d. > I was able to set up a simple replication between a master and a slave. > > To fully understand the replication mechanism of MySQL i would like to ask > some questions (the manual does not answer all my questions): > > (a) in 4.0.20d there is no way for a kind of Master-Master replication, > means, that both databases replicate to each other, right? > (b) Will there be such a feature in Version 5 (and does anyone know when it > is planned to declare version 5 as stable and productive)? > (c) Or is clustering a kind of Master-Master replication? > (d)Is it possible to have a MySQL database server being Slave of a Master A > and serving as Master for a Slave B at the same time and for the same > database? > (e) When i have a Master-Slave replication, what happens when i delete a > replicated record on the Slave - will the record than be replicated again or > will the record "remain" deleted? > > So far my questions and i'm aware that some of them sound quiet wired, so i > will try do explain what i'm trying to do: > > I have an application that runs on a server using a MySQL database that is > also installed on that server. Besides i have the same server with the same > configuration as a hot standby in case of something bad happens to my first > (productive) server. Let's refer to them as Server A (active) and B (hot > standby). > Both servers have a public Network interface and a private Network > interface. On the public side, they have the SAME IP Address. To avoid > collisions, the are connected to a managed switch where only the port to > Server A is active and is switch to port to Server B in case of emergency. > On the private Interface both servers carry a own, unique private IP > Address. > Since Server B acts as hot standby, it's database should always be up to > date, so i planned to use replication between Server A and B. A would act as > Master, B as Slave. So far, so good. > Now there is a third MySQL server (let's call it C) at a different location > (interconnection by a VPN over the internet). This server needs the data > from a table of my database in "almost-realtime". So i thought, replication > would be a good mechanism to do that. Now there are some problems: > (a) I know how to setup a replication A Master, C Salve, but what happens if > A goes down and we have to switch to the hot standby B? B is configured as > Slave in relation to A, so C would not be able to get Data from B. Is there > a way to setup a Master-Slave relation from B to C so C could replicate the > same data from B as it did before from A? > (b) The Application on Server C is going to delete records that have been > replicated. What happens then, will C replicate the deleted records again or > will they "remain" deleted on C? On A or B they should never be deleted, > regardless of what is done on C? > (c) After an case of emergency when i want to bring A up again and let it > server as active Server again, how would i be able to "replicate" the > records that have been created on B during the absence of A? At the moment, > i see no other way as to do this manually, as long as there is nothing like > Master-Master replication. Any other ideas? > > Maybe i'm on a totally wrong track, maybe all some of you cracks out there > have a better idea how to solve this? Would clustering be such a solution? > Are there any other kind of synchronisation/replication tools that would > allow me to setup a configuration as needed? > > I'm very thankful for any kind of support. > > Thanks a lot > Frank -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]