I’m trying to connect mysql in azure from custom database section, but get error:
“ER_HANDSHAKE_ERROR: Bad handshake”
It seems that need to set ssl:{} in connection option like below:
var connection = mysql.createConnection({
host: 'xxxx.mysql.database.azure.com',
port: '3306',
user: 'user name',
password: 'password',
database: 'database name',
insecureAuth: true,
ssl: {
ca: fs.readFileSync(__dirname + '/certs/cert.pem'),,
//key: fs.readFileSync(__dirname + '/certs/client-key.pem'),
//cert: fs.readFileSync(__dirname + '/certs/client-cert.pem')
}
});
But, how can I put the pem file into auth0? or any other way to solve this issue?