I have
app.connectionPool = mysql.createPool({
host : * * *, //(a.k.a ....rds.amazonaws.com)
user : * * *,
password : * * *,
database : * * *,
ssl: 'Amazon RDS'
});
for initializing the db pool and it works fine locally (where my IP is whitelisted in RDS settings) but gives [Error connect ETIMEOUT]
error when run from heroku.
I also tried:
app.connectionPool = mysql.createPool({
host : * * *, // (....rds.amazonaws.com)
user : * * *,
password : * * *,
database : * * *,
ssl : {
ca : fs.readFileSync(__dirname + '/config/amazon-rds-ca-cert.pem')
}
});
following node-mysql and heroku docs but didn't work either.
PS: I have set GRANT USAGE ON *.* TO 'my_username'@'%' REQUIRE SSL;
as suggested in the heroku documentation.