Skip to content

Instantly share code, notes, and snippets.

@kevinsmith
Created September 22, 2010 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinsmith/591162 to your computer and use it in GitHub Desktop.
Save kevinsmith/591162 to your computer and use it in GitHub Desktop.
/*
| This is not the full database file, but the relevant modifications
| only. You'll need a database group for each of the servers involved
| in your EE project (i.e. dev, staging, production). Info here:
| http://codeigniter.com/user_guide/database/configuration.html
|
| Remember: the if/then statement below that defines $active_group will
| only work if you've modified your constants.php file according to this
| gist: http://gist.github.com/591155
*/
$db['expressionengine']['hostname'] = "127.0.0.1";
$db['expressionengine']['username'] = "db_username1";
$db['expressionengine']['password'] = "**********";
$db['expressionengine']['database'] = "db_name1";
$db['expressionengine']['dbdriver'] = "mysql";
$db['expressionengine']['dbprefix'] = "exp_";
$db['expressionengine']['pconnect'] = FALSE;
$db['expressionengine']['swap_pre'] = "exp_";
$db['expressionengine']['db_debug'] = TRUE;
$db['expressionengine']['cache_on'] = FALSE;
$db['expressionengine']['autoinit'] = FALSE;
$db['expressionengine']['char_set'] = "utf8";
$db['expressionengine']['dbcollat'] = "utf8_general_ci";
$db['expressionengine']['cachedir'] = $_SERVER['DOCUMENT_ROOT'] . "/system/expressionengine/cache/db_cache/";
$db['live']['hostname'] = "localhost";
$db['live']['username'] = "db_username2";
$db['live']['password'] = "************";
$db['live']['database'] = "db_name2";
$db['live']['dbdriver'] = "mysql";
$db['live']['dbprefix'] = "exp_";
$db['live']['pconnect'] = FALSE;
$db['live']['swap_pre'] = "exp_";
$db['live']['db_debug'] = TRUE;
$db['live']['cache_on'] = FALSE;
$db['live']['autoinit'] = FALSE;
$db['live']['char_set'] = "utf8";
$db['live']['dbcollat'] = "utf8_general_ci";
$db['live']['cachedir'] = $_SERVER['DOCUMENT_ROOT'] . "/system/expressionengine/cache/db_cache/";
// Check the configuration group in use exists, if not use the default
$active_group = (defined('SITE') && array_key_exists(SITE, $db)) ? SITE : 'live';
@kevinsmith
Copy link
Author

Changed 'dev' to 'expressionengine' to make it possible to perform upgrades locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment