title: What is the best way to mirror a DB server?
body: <p>I am creating a website and am expecting somewhat normal usage. I am setting up the system  for now with 1 Apache Server and 2 DB servers. I want any DB operations to be reflected in both DB servers so that I can have 1 server as Backup. Now how do I do it ?</p>
  
  <p>The ways I can think of are :</p>
  
  <ol>
  <li>Perform same operations in both DB from PHP. This seems like a terrible idea.</li>
  <li>Update 1 DB and sync both DB servers periodically. This seems better.</li>
  </ol>
  
  <p>Is there any better way to achieve this ? How is it done in Enterprises ?</p>