I'm not needing help with failover connection, just what might be wrong with this failover array? I have tested the alternate db connection and works great. Issue is when I turn off primary, failover does not connect as it should. This is straight from Code Igniter Documentation. So any tricks or tips to help troubleshoot?
/*
* Mysql Driver
*/
$db['mysql']['hostname'] = getenv('DB_HOST');
$db['mysql']['username'] = getenv('DB_USERNAME');
$db['mysql']['password'] = getenv('DB_PASSWORD');
$db['mysql']['database'] = getenv('DB_DATABASE');
$db['mysql']['dbdriver'] = 'mysql';
$db['mysql']['dbprefix'] = '';
$db['mysql']['pconnect'] = FALSE;
$db['mysql']['db_debug'] = FALSE;
$db['mysql']['cache_on'] = FALSE;
$db['mysql']['cachedir'] = '';
$db['mysql']['char_set'] = 'utf8';
$db['mysql']['dbcollat'] = 'utf8_general_ci';
$db['mysql']['swap_pre'] = '';
$db['mysql']['autoinit'] = TRUE;
$db['mysql']['stricton'] = FALSE;
$db['mysql']['failover'] = array(
array(
'hostname' => getenv('DB_HOST2'),
'username' => getenv('DB_USERNAME2'),
'password' => getenv('DB_PASSWORD2'),
'database' => getenv('DB_DATABASE2'),
'dbdriver' => 'mysql',
'dbprefix' => '',
'pconnect' => TRUE,
'db_debug' => TRUE,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE
)
);