1

I try to connect to an Azure MySQL DB with ssl.

new Sequelize('db', 'user', 'pw',
    {
        host: '...',
        port: '3306',
        dialect: 'mysql',
        dialectOptions: {
            insecureAuth: true,
            ssl: {
                ca: fs.readFileSync('ca.pem')
            }
        }
    }

However I get ... `

SequelizeConnectionError: ER_HANDSHAKE_ERROR: Bad handshake

I have already tried:

https://github.com/sequelize/sequelize/issues/578

`

Hello
  • 632
  • 7
  • 14
Chris
  • 13,100
  • 23
  • 79
  • 162

2 Answers2

0

Ensure that your credentials are in the format of user@servername; this is required for Azure Database for MySQL.

0

A little late to the party but just came across this myself. This thread helped me solve it. If it's an option you could also just downgrade your version of Node but that's more of a bandaid than a fix.

Obscenity
  • 197
  • 12