Closed
Description
It seems like the current version, 3.5.1 is unable to connect successfully to RDS instances using the rds-ca-rsa2048-g1
certificate authority.
Example code:
// get the client
const mysql = require('mysql2');
// create the connection to database
const connection = mysql.createConnection({
host: 'xyz.c8dqrcnbng7v.eu-west-1.rds.amazonaws.com',
port: 3306,
user: 'abc',
password: 'abc',
database: 'information_schema',
ssl: "Amazon RDS"
});
// simple query
connection.query(
'show tables;',
function(err, results, fields) {
console.log(results); // results contains rows returned by server
console.log(fields); // fields contains extra meta data about results, if available
}
);
Throws the following:
undefined
undefined
Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1539:34)
at TLSSocket.emit (node:events:513:28)
at TLSSocket._finishInit (node:_tls_wrap:953:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:734:12) {
code: 'HANDSHAKE_SSL_ERROR',
fatal: true
}
Metadata
Metadata
Assignees
Labels
No labels