2010年12月21日星期二

Re: [fw-db] PDO_MYSQL Alternative connection on failure

Hello Ron,
I would place database servers access information in the config file then I would call the config from bootstrap or plugin (Zend_Controller_Plugin_Abstract) class. Then you check whether the primary database server is up. If the primary is down you can set to use alternative database server. ;-)

As a reference, take a look at:

http://jaybill.com/2007/09/12/using-the-zend-framework-with-multiple-databases/
http://ingol.nl/blog/2010/08/23/adding-multiple-databases-to-the-application-ini-in-zend-framework/


---
Wishing luck,
Enkhbilguun Erdenetsogt
   
On 10.12.21 23:25, goosta wrote:
 Hi,  I am using PDO_MYSQL to connect to our MySQL server. We are looking at setting up a MySQL cluster and I'm trying to figure out if I can have an alternate server specified if connection to the first server fails. So if a connection to the first server cannot be made, it would move on and try the second server.  If anyone can point me in the right direction, I'd really appreciate it.  Thanks, Ron 

没有评论: