On Tue, Jul 17, 2001 at 09:37:19PM -0700, Ricardo Kleemann wrote:
>
> Hi everyone,
>
> I'm wondering how I should configure my.cnf if I have a master-slave
> scenario where I would like to declare the slave master if the
> master goes down.
>
> What I mean is, let's say I have 2 database servers:
>
> server1 = master
> server2 = slave
>
> so normally my.cnf for server2 would have server1 configured as
> master-host, and server1 would not have any master database server
> configured.
So far, so good.
> So assuming server1 goes down, I'd have to declare server2 as
> master, and have it no longer use the "master-host".
Actually, if there is only one slave, you can simply stop the slave
thread using SLAVE STOP. And then comment out the master stuff in
my.cnf on the slave.
> My confusion is mostly with server1. When it comes back up, how is
> it supposed to work? Is it supposed to suddenly become a slave? Or
> does it again come up as master and then server2 relinquishes its
> master status?
It's a manual process. You'll probably want to make it a slave of
server2.
> How can all of this be done automatically? It seems a little
> confusing to me to have to have all this automatic switching...
Today, you have to write a script/program to do it the way you want it
done. It is not automatic. There are plans for automatic master
elections in MySQL 4.x, so there is help in sight--it just won't help
you for a while. :-)
Jeremy
--
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 <-- NEW
MySQL 3.23.29: up 33 days, processed 263,660,251 queries (89/sec. avg)
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php