MySQL Forums
Forum List  »  Replication

Re: automating backup in a replicate envrionment
Posted by: Peter Halliday
Date: January 12, 2005 10:08AM

show slave status if ran on a master will return an empty set, so that still can be used to determine if it is slave or master. SHOW SLAVE STATUS will show whether it actively acting as a slave or not.

So it sounds like the real issue is when a slave takes over it doesn't clear its role as a slave is that so? STOP SLAVE should stop it acting like a slave. RESET SLAVE should remove all the files that are associated with the SLAVE role. If you have the CHANGE MASTER TO lines in the my.cnf and don't want to have to restart the server to change that when it fails. You can start each server up with different server IDs and to log-bin; so make both think they are a master. Then have a script give the CHANGE_MASTER_TO lines to the server that is supposed to be slave on startup. Not sure the best way to do that. However, The SHOW SLAVE STATUS will help determine who really is acting like a slave, and not just has some threads running.

Options: ReplyQuote

Written By
Re: automating backup in a replicate envrionment
January 12, 2005 10:08AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.