How can I connect to Azure MySQL using sequelize?
From Azure nodejs example:
const mysql = require('mysql2');
var config =
{
host: 'myserver4demo.mysql.database.azure.com',
user: 'myadmin@myserver4demo',
password: 'your_password',
database: 'quickstartdb',
port: 3306,
ssl: true
};
what is the configuration for sequelize:
I tried using ssl but not successful:
ssl: true,
I got this error:
Unable to connect to database: SequelizeConnectionError: SSL connection is required. Please specify SSL options and retry.
I got this work:
dialectOptions: {
encrypt: true,
ssl : {
rejectUnauthorized: false
}
},
but where to find the cert?