Welcome Guest, Not a member yet? Register   Sign In
Connecting to remote database
#2

Zakk, I connect to AWS RDS. I do this by setting the connection params in the database.php in the config dir.

$db['default'] = array(
'dsn' => '',
'hostname' => 'database-2.ast-1.rds.amazonaws.com',
'username' => 'adn',
'password' => '1b3o',
'database' => 'subator',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);

You also need to use this in your code:

$this->load->database();
proof that an old dog can learn new tricks
Reply


Messages In This Thread
Connecting to remote database - by Zakk - 11-16-2022, 07:17 AM
RE: Connecting to remote database - by richb201 - 11-22-2022, 08:30 AM
RE: Connecting to remote database - by InsiteFX - 03-30-2023, 11:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB