SSL connection to MySQL Azure crashing in Node.js app
According to all the docs Microsoft provides for their new Azure MySQL product, I still get the same error
Error: 140736265921472:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794
I tried this in Linux docker container if I had macOS issue.
Sample code, I tried this isolated from my application to make sure:
var mysql = require('mysql2');
var conn = mysql.createConnection({
host: "mydbname.mysql.database.azure.com",
user: "user@mydbname",
password: 'password',
database: 'dbname',
port: 3306,
ssl: {
ca: fs.readFileSync('./BaltimoreCyberTrustRoot.crt'),
}
});
Documentation I:
https://docs.microsoft.com/en-us/azure/mysql/howto-configure-ssl https://docs.microsoft.com/en-us/azure/mysql/howto-connection-string
I've tried both mysql
and mysql2
node drivers with no success. Has anyone solved this?
source to share
Thanks for reporting the problem. The bug was found in our internal tests and has been fixed. We'll be rolling out the fix in a few days and we'll keep you posted. In the meantime, please use non-ssl mode for mitigation if you can. Thank!
----- ----- Change
Hi, the fix has been rolled out. Try it! Thank.
source to share