or die another mysql connect
I am running two mirrored mysql servers that are splitting the load on mysql SELECT requests. I am sort of worried about one failing and leaving 50% of requests out to dry (since the split is 50/50).
So, I was wondering if I could write my connection script to allow for using the other mysql connection if the first attempt fails
Can I do or die mysql_connect to my other server option?
$connection=mysql_connect ("xxx.xx.xx.xxx", "user", "pw") or die ('I cannot connect to the database because: ' . mysql_error());
Example: or die (mysql_connect ("xxx.xx.xx.xx2", "user", "pw"));