I haven't done it in a nice way and I haven't done it in a long time,
but you can do this.

In the past, I've done the following:

On the slave:

1) stop the server
2) comment out all the lines in my.cnf that refer to the machine as
being a slave -- you still need your binary log directives though.
You'll also need to nuke all of your binary logs on the slave, along
with the status files.
3) start the server and test some updates -- you want to make sure
your binary logs are working

At this point, you're all set. I'm sure there is a way to do this with
a CHANGE MASTER TO command.

When you want to turn your master back on, you can use a CHANGE MASTER
TO on the master machine. This will make it a slave to your slave
server. Once you're all back in sync, you need to disable replication
and run the CHANGE MASTER TO command on the slave server.

On Thu, 31 Mar 2005 16:02:55 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
> We have one master and one slave database and use the slave for reads.
> If for some reason our master goes down,
> we would like to make our slave the master and use it for both writes
> and reads and then switch to the original configuration
> when the master is up, which includes updating the master copy. Limited
> downtime/locking of the second database is OK.
> 
> Is this something that is easy to do or recommended? If so, what steps
> we need to go through or where can I find isome nformation regarding
> this? If not, what other approachs are there (assuming we only have two
> machines w/ above configuration).
> 
> Thanks,
> 
> -JF
> 
> --
> 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