Note: I tried to search the forum for something similar and didn't find any results.
I am using Lightsail EC2 and Database (two separate instances, both in same aws region).
I am updating my config.php on the ec2 instance as below (I have removed the lines that are default to not clutter here.):
$CFG->dbtype = 'auroramysql'; // 'pgsql', 'mariadb', 'mysqli', 'auroramysql', 'sqlsrv' or 'oci'
$CFG->dbhost = '<my end point>'; // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname = 'moodle-db'; // database name, eg moodle
$CFG->dbuser = '<my db username>'; // your database username
$CFG->dbpass = '<my db password>'; // your database password
$CFG->dboptions = array(
'dbport' => '3306', // the TCP port number to use when connecting
When I try to connect via browser, I get: Error: Database connection failed
My question - is my config looking right or do I need to make any changes? And if it is right, what could be going wrong?