Mysql Replication

Hi all,

  1. now working on mysql replication setup. i have doubt when my master server goes down how do i make my slave server to act as a master.

  2. once crashed server is now ready to serve, how do i will change current master server to old master server.

  1. you can do it manually - ‘stop slave’ on server 2, ensure that read_only is set to 0, and send queries to server 2.
  2. once server 1 is up, you should re-synchronize it from server 2 (the same way as you setup replication), configure server 2 to act as slave for server 1, and switch queries back to server1.

Probably it makes sense to look at MMM: http://code.google.com/p/mysql-master-master/ - it can help to do things automatically.