SSL connection is required. Please specify SSL options and retry #13015
Unanswered
pavan2106
asked this question in
Help & Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I am working on Nodejs application which is built on Typescript. Here I am connecting to MySQL and same cade having challenges in connect MySQL DB in Azure. Needs suggestion what could be root cause of the issue?
Note: Dynamic values will modified using .env file
Below is the code we are using to establishing DB connection.
import { frameworkConfig } from '../framework.config';
import { Sequelize } from 'sequelize';
import logger from '../utilities/logger';
const commercialDbConfig = frameworkConfig.dbSettings.commercialDbConfig;
const sequelize = new Sequelize(
commercialDbConfig.database as string,
commercialDbConfig.user as string,
commercialDbConfig.password as string,
{
host: commercialDbConfig.host,
dialect: 'mysql',
dialectOptions: {
decimalNumbers: true
},
logging: msg => logger.debug(msg)
});
export function checkDbConnection(): void {
sequelize
.authenticate()
.then(() => {
logger.info('DB connection established successfully');
})
.catch(err => logger.error(
Unable to connect to database. ${err}
));}
export { sequelize };
Beta Was this translation helpful? Give feedback.
All reactions