What's the best Node.js mysql module for connecting to mysql over ssl?
var mysql = require('mysql');
var fs = require('fs');
var connection = mysql.createConnection({
host : 'localhost',
user : 'me',
password : 'secret',
database : 'my_db',
ssl : {
ca : fs.readFileSync('./ssl/server-ca.pem'), // should be enough for AWS
key : fs.readFileSync('./ssl/client-key.pem'), // required for google mysql cloud db
cert : fs.readFileSync('./ssl/client-cert.pem'), // required for google mysql cloud db
}
});
that should do the trick.