Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In a master-slave replication environment, what is required to automatically promote the slave as the master if the master goes down. What are common practice used to change the database reference from an application if the heartbeat of the master database is not detected?

Do I need a cluster to achieve this or is simple 2 machine environment sufficient?

share|improve this question

This is not something you can do with MySQL alone, at least in versions up to 5.5. An additional tool, like Tungsten Replicator, can help you to automate the process.

If you're using MySQL in a mission-critical environment, there are a lot of possible routes to high availability. You can contract Oracle support, or an expert support and consulting firm, like Percona or SkySQL, to help you select and deploy the best configuration for your needs.

share|improve this answer
You could also consider using CentOS clustering (a free version of Redhat Cluster Suite). The documentation can be a bit opaque, but once you have luci set up with fencing devices (easy on VMware) and a shared disk, it gets easier. Put the quorum partition on the shared disk, configure the rest of it as LVM, and use HA-LVM to prevent both nodes mounting it at once. – Terence Johnson Sep 15 '12 at 12:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.