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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With