You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Error: self-signed certificate in certificate chain", the certificate used in the document has been changed.
I suggest changing the SSL certificate listed in the documentation from ``BaltimoreCyberTrustRoot.crt.pem`` to ``DigiCertGlobalRootCA.crt``.
I have tried to connect to Azure Database for MySQL from Node.js according to the following documentation.
[https://learn.microsoft.com/ja-jp/azure/mysql/single-server/connect-nodejs](connect-nodejs)
However, I got an error ```Error: self-signed certificate in certificate chain``` and could not connect to the database.
I haven't been able to track down the exact cause, but the SSL certificate I downloaded from the Azure Portal "Azure Database for MySQL flexible server -> Networking -> Download SSL Certificate" was ```DigiCertGlobalRootCA.crt```, so I believe this is the correct one.
Copy file name to clipboardExpand all lines: articles/mysql/single-server/connect-nodejs.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,9 +101,9 @@ Get the connection information needed to connect to the Azure Database for MySQL
101
101
102
102
1. Paste the JavaScript code into new text files, and then save it into a project folder with file extension .js (such as C:\nodejsmysql\createtable.js or /home/username/nodejsmysql/createtable.js).
103
103
1. Replace `host`, `user`, `password` and `database` config options in the code with the values that you specified when you created the server and database.
104
-
1.**Obtain SSL certificate**: Download the certificate needed to communicate over SSL with your Azure Database for MySQL server from [https://www.digicert.com/CACerts/BaltimoreCyberTrustRoot.crt.pem](https://www.digicert.com/CACerts/BaltimoreCyberTrustRoot.crt.pem) and save the certificate file to your local drive.
104
+
1.**Obtain SSL certificate**: Download the certificate needed to communicate over SSL with your Azure Database for MySQL server from [https://dl.cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem](https://dl.cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem) and save the certificate file to your local drive.
105
105
106
-
**For Microsoft Internet Explorer and Microsoft Edge:** After the download has completed, rename the certificate to BaltimoreCyberTrustRoot.crt.pem.
106
+
**For Microsoft Internet Explorer and Microsoft Edge:** After the download has completed, rename the certificate to DigiCertGlobalRootCA.crt.pem.
107
107
108
108
See the following links for certificates for servers in sovereign clouds: [Azure Government](https://www.digicert.com/CACerts/BaltimoreCyberTrustRoot.crt.pem), [Azure China](https://dl.cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem), and [Azure Germany](https://www.d-trust.net/cgi-bin/D-TRUST_Root_Class_3_CA_2_2009.crt).
109
109
1. In the `ssl` config option, replace the `ca-cert` filename with the path to this local file.
0 commit comments