Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does PHP have a built in mechanism to failover from one database server to another?

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.

like image 880
Kev Avatar asked Oct 10 '08 14:10

Kev


1 Answers

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.

like image 196
extraneon Avatar answered Sep 24 '22 19:09

extraneon