Question
Nodejs connecting to managed mysql database ERR: connect ETIMEDOUT
Hi, my nodejs has connect ETIMEDOUT error. i wonder what is happening.
this is my connection on my nodejs
var mysql = require(‘mysql’);
var con = mysql.createConnection({
host: “db-mysql-xxx-xxx-do-user-xxx-0.a.db.ondigitalocean.com”,
user: “xxx”,
password: 'xxx’,
database: “xxx”,
multipleStatements:true,
port: 8889,
queryTimeout: 6000,
connectTimeout: 60000,
});
con.connect(function (err){
if(err) throw err;
});
module.exports = con;
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
I am having the same issue