On Thu, 3 Mar 2005, Olivier Kaloudoff wrote: > Hello, > > we're working on a two node setup to achieve high > availability using 4.1.8; > > we first setup both servers with --bin-log, and only > the slave server (db1) with --log-slave-updates. (binary logfile > name is "master" on both server) > > replication from db0 to db1 runs smoothly. > > next, we stop both servers and db1 becomes master, with > db0 slave. Replication still ok. > > second stop: db0 becomes master like at the beginning, > db1 slave.
Do you shut down both databases when you swap their functions? If so did you let the slave catch up before you shut it down? Working with replication in this manner gets tricky real quick.. :) Do you have the replication options in my.cnf, such as master-host/master-user/etc? If not, I would suggest managing replication manually using 'CHANGE MASTER TO'. When you want to swap duties, do something like (assuming m1 = current master, m2 = current slave): m1: deny updates m2: make sure slaving catches up, then issue 'SLAVE STOP' m2: issue 'RESET MASTER' (start sending write queries to m2) m1: 'CHANGE MASTER TO MASTER_HOST = 'm2', MASTER_USER = '..', ...' http://dev.mysql.com/doc/mysql/en/change-master-to.html Since you have reset the master, when you do 'CHANGE MASTER TO ..' you should not specify any binlog information as it will start from the beginning. I have never tried this exact scenario myself, but hopefully you can work with the ideas. :) Atle - Flying Crocodile Inc, Unix Systems Administrator -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]