I found this:
http://www.evolt.org/failover-database-connection-with-php-mysql
and similar examples. But is there a better way?
I am thinking along the lines of the Automatic Failover Client in the MS SQL Native Client.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s traditional to handle failover strategies at the system level; that way all applications can enjoy a robust environment.
I’d like to refer to MySQL failover strategy and MySQL proxy. The latter describes a MySQL utility that can do load balancing and failover, and seems quite easy to set up.
Not the answer to the question, but it is the more common solution to handle failover.