I think it's simpler than you thought. Just set up circular replication (A
replicates B, B replicates A) and ensure, at the application level, that
you only write on one machine for each separate database. MySQL handles
circular replication: updates travel round the circle until the reach the
machine which originated them, when they are dropped. If you are handling
the changeover logic yourself, you have very little problem. When the
application detects that the machine it was using has failed, it should
switch to the slave. Reconstruction when the failed machine comes back is
more of a problem.

      Alec



|---------+---------------------------->
|         |           Jonathan Tullett |
|         |           <[EMAIL PROTECTED]|
|         |           om>              |
|         |                            |
|         |           21/10/2003 22:38 |
|         |                            |
|---------+---------------------------->
  
>------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                          |
  |       To:       [EMAIL PROTECTED]                                                  
                                      |
  |       cc:                                                                          
                                          |
  |       Subject:  Replication RO/RW DBs on same server.                              
                                          |
  
>------------------------------------------------------------------------------------------------------------------------------|




Hello,

I have spent the last few hours searching through the archives for help
with this question, and have also been reading the MySQL documentation, so
please excuse me if I am being monumentally blind and missing something
obvious.

I am trying to set up a MySQL installation like so:

               R/W DB                RO DB
Machine A:     fred                   hank
Machine B:     hank                   fred

So, Machine A will be Master for 'fred' and slave for 'hank' and Machine B
will be Master for 'hank' and slave for 'fred'

My theory is that in worst case scenario and one of the machines goes
belly up, it would be a relatively easy change to switch the readonly DB
on the other machine into RW mode.

I cant see a way in the config to enable this kind of setup.  Am I missing
something very obvious, or is it more complicated than I thought?

It is purely the setup config/theory I am looking for here, once that is
sorted ill work on the fail over mechanisms myself.

Any help/advice/assistance you can provide will be greatly appreciated.

Many thanks,
Jonathan Tullett



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]







-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to