diff options
author | Felix Balfoort <fhjbalfoort@gmail.com> | 2011-11-29 15:53:01 +0100 |
---|---|---|
committer | Felix Balfoort <fhjbalfoort@gmail.com> | 2011-11-29 15:54:00 +0100 |
commit | 5d581b6d664c6ef662bcb9572ca147ac17af52cb (patch) | |
tree | 70118d4a8979d2faf220483caf4aef7fb63f7194 /system/libraries/Pagination.php | |
parent | 0bb866e6e1c55a536a3029eaaf1913e46512a51a (diff) |
The DB_driver can now use failover databases if specified
The DB_driver can now use failover databases if specified.
If the main connection shouldn't connect for some reason the DB_driver will now try to connect to specified connections in the failover config.
Example config:
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = '';
$db['default']['password'] = '';
$db['default']['database'] = '';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
$db['default']['failover'] = array();
$db['default']['failover'][0]['hostname'] = 'localhost1';
$db['default']['failover'][0]['username'] = '';
$db['default']['failover'][0]['password'] = '';
$db['default']['failover'][0]['database'] = '';
$db['default']['failover'][0]['dbdriver'] = 'mysql';
$db['default']['failover'][0]['dbprefix'] = '';
$db['default']['failover'][0]['pconnect'] = TRUE;
$db['default']['failover'][0]['db_debug'] = TRUE;
$db['default']['failover'][0]['cache_on'] = FALSE;
$db['default']['failover'][0]['cachedir'] = '';
$db['default']['failover'][0]['char_set'] = 'utf8';
$db['default']['failover'][0]['dbcollat'] = 'utf8_general_ci';
$db['default']['failover'][0]['swap_pre'] = '';
$db['default']['failover'][0]['autoinit'] = TRUE;
$db['default']['failover'][0]['stricton'] = FALSE;
$db['default']['failover'][0]['failover'] = array();
$db['default']['failover'][1]['hostname'] = 'localhost2';
$db['default']['failover'][1]['username'] = '';
$db['default']['failover'][1]['password'] = '';
$db['default']['failover'][1]['database'] = '';
$db['default']['failover'][1]['dbdriver'] = 'mysql';
$db['default']['failover'][1]['dbprefix'] = '';
$db['default']['failover'][1]['pconnect'] = TRUE;
$db['default']['failover'][1]['db_debug'] = TRUE;
$db['default']['failover'][1]['cache_on'] = FALSE;
$db['default']['failover'][1]['cachedir'] = '';
$db['default']['failover'][1]['char_set'] = 'utf8';
$db['default']['failover'][1]['dbcollat'] = 'utf8_general_ci';
$db['default']['failover'][1]['swap_pre'] = '';
$db['default']['failover'][1]['autoinit'] = TRUE;
$db['default']['failover'][1]['stricton'] = FALSE;
$db['default']['failover'][1]['failover'] = array();
Signed-off-by: Felix Balfoort <fhjbalfoort@gmail.com>
Diffstat (limited to 'system/libraries/Pagination.php')
0 files changed, 0 insertions, 0 deletions