azure-database-mysql

Cannot connect Azure Web App - NodeJS to Azure Mysql

回眸只為那壹抹淺笑 提交于 2019-12-02 08:02:07
I am using azure connection string (from Azure portal) for Node.js app, still cannot connect to Azure Database for Mysql server. var conn = mysql.createConnection({ host: yourhost, user: "username", password: "password", database: "database", port: 3306, ssl:{ca:fs.readFileSync(__dirname + '/baltimore.pem')}}); I get following error: "Error: MySQL server is requesting the old and insecure pre-4.1 auth mechanism.Upgrade the user password or use the {insecureAuth: true} option." But I can connect using Mysql Benchmark same credentials. What I am doing wrong ? Azure Database for MySQL is