You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if node-mysql actually supports SSL.
Edit: I see that it does. To pass options along specifically to the mysql driver you need to use dialectOptions
I am trying to connect to mysql database in Amazon RDS with Node, and its failing mentioning the reason as
"{"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":3306,"fatal:true"}"
The code I have written is
var con = mysql_db.createConnection({
database: 'OCOC',
hostname: 'ococ.xxxxxxxx.ap-southeast-1.rds.amazonaws.com:3306',
//port: '3306',
username: 'xxxxxx',
password: 'xxxxxxx',
dialectOptions: {ssl:'Amazon RDS'}
});
Directly giving ssl was not working, so after reading your post I added dialectOptions, but the issue still not resolved. Even if I remove the ssl command still it fails.
Hope you might give me some insight as I am stuck with it for 2 days now. Also without adding ssl it is getting connected from cmd.
Activity
mickhansen commentedon Feb 11, 2014
I don't know if node-mysql actually supports SSL.
Edit: I see that it does. To pass options along specifically to the mysql driver you need to use
dialectOptionsjanmeier commentedon Feb 11, 2014
Have you tried
Everything in dialectOptions is passed directly to node-mysql
janmeier commentedon Feb 11, 2014
By the way the Amazon RDs certificate seems to be a pretty recent addition to node-mysql, so perhaps you needs to update?
janmeier commentedon Feb 11, 2014
The RDS ssl profile is not published in npm yet.
Added 7 days ago mysqljs/mysql@060185d
While the node mysql package was last updated a month ago https://www.npmjs.org/package/mysql
You should point your package at their github repo or bug them to publish a new version :)
janmeier commentedon Feb 11, 2014
Does it work if you try to create a connection directly using node mysql?
mickhansen commentedon Feb 12, 2014
Great!
shubhamagarwal90 commentedon Oct 9, 2016
Hello
I am trying to connect to mysql database in Amazon RDS with Node, and its failing mentioning the reason as
"{"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":3306,"fatal:true"}"
The code I have written is
var con = mysql_db.createConnection({
database: 'OCOC',
hostname: 'ococ.xxxxxxxx.ap-southeast-1.rds.amazonaws.com:3306',
//port: '3306',
username: 'xxxxxx',
password: 'xxxxxxx',
dialectOptions: {ssl:'Amazon RDS'}
});
});
Directly giving ssl was not working, so after reading your post I added dialectOptions, but the issue still not resolved. Even if I remove the ssl command still it fails.
Hope you might give me some insight as I am stuck with it for 2 days now. Also without adding ssl it is getting connected from cmd.
felixfbecker commentedon Oct 9, 2016
@shubhamagarwal90 That isn't Sequelize code
gustaflindqvist commentedon May 10, 2017
Is it still a dead-end to getting Sequelize.js to work with Amazon RDS?
vedran-maricevic commentedon Jul 3, 2018
What do we put in this setting:
Just an Amazon RDS? Or Certificate?
hitautodestruct commentedon Sep 26, 2018
@wexoni Just this will do: