OK. I have created a table in AWS RDS postgres and I have modified my database.php. Here is the setup in database.php for the postgres:
$db['postgres'] = array(
'dsn' => '',
'hostname' => 'postgresql://imagesdatabase.cwymdn16cxes.us-east-1.rds.amazonaws.com',
'username' => 'richb201',
'password' => 'xxx',
'database' => 'images',
'dbdriver' => 'postgre', //ok
'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,
'port' =>5432
);
Before I break out the champagne
, how can I test that I can connect to the RDS postgres from CI? I also have a local mySQL dbase which is the default ( $dn['default']= array(...) When I $this->load->database(), I don't get an error. Does this mean my connection to postgres worked? I am using Jaspersoft Studio and with it I can connect to the RDS Postgres fine as the "test link" in Jaspersoft Studio shows.
I modified the dsn to be: dbc:postgresql://imagesdatabase.cwymdn16cxes.us-east-1.rds.amazonaws.com:5432/postgres as per the note in the CI manual.
proof that an old dog can learn new tricks