Skip to content

Commit ba6c5c3

Browse files
authored
Merge pull request #106171 from hiroaki-saito/patch-1
Updated the SSL certificate change as described in the documentation due to the error "Error: self-signed certificate in certificate chain".
2 parents d936522 + 5249d4d commit ba6c5c3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/mysql/single-server/connect-nodejs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ Get the connection information needed to connect to the Azure Database for MySQL
101101

102102
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).
103103
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.
105105

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.
107107

108108
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).
109109
1. In the `ssl` config option, replace the `ca-cert` filename with the path to this local file.
@@ -128,7 +128,7 @@ var config =
128128
password: 'your_password',
129129
database: 'quickstartdb',
130130
port: 3306,
131-
ssl: {ca: fs.readFileSync("your_path_to_ca_cert_file_BaltimoreCyberTrustRoot.crt.pem")}
131+
ssl: {ca: fs.readFileSync("your_path_to_ca_cert_file_DigiCertGlobalRootCA.crt.pem")}
132132
};
133133

134134
const conn = new mysql.createConnection(config);
@@ -195,7 +195,7 @@ var config =
195195
password: 'your_password',
196196
database: 'quickstartdb',
197197
port: 3306,
198-
ssl: {ca: fs.readFileSync("your_path_to_ca_cert_file_BaltimoreCyberTrustRoot.crt.pem")}
198+
ssl: {ca: fs.readFileSync("your_path_to_ca_cert_file_DigiCertGlobalRootCA.crt.pem")}
199199
};
200200

201201
const conn = new mysql.createConnection(config);
@@ -247,7 +247,7 @@ var config =
247247
password: 'your_password',
248248
database: 'quickstartdb',
249249
port: 3306,
250-
ssl: {ca: fs.readFileSync("your_path_to_ca_cert_file_BaltimoreCyberTrustRoot.crt.pem")}
250+
ssl: {ca: fs.readFileSync("your_path_to_ca_cert_file_DigiCertGlobalRootCA.crt.pem")}
251251
};
252252

253253
const conn = new mysql.createConnection(config);
@@ -296,7 +296,7 @@ var config =
296296
password: 'your_password',
297297
database: 'quickstartdb',
298298
port: 3306,
299-
ssl: {ca: fs.readFileSync("your_path_to_ca_cert_file_BaltimoreCyberTrustRoot.crt.pem")}
299+
ssl: {ca: fs.readFileSync("your_path_to_ca_cert_file_DigiCertGlobalRootCA.crt.pem")}
300300
};
301301

302302
const conn = new mysql.createConnection(config);

0 commit comments

Comments
 (0)