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?


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.

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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