Azure-docs: Wrong documented command to connect to MySQL Server requiring SSL

Created on 14 Mar 2020  Â·  2Comments  Â·  Source: MicrosoftDocs/azure-docs

There is a wrong command documented here: Tutorial: Build a PHP and MySQL app in Azure.

Following the instructions, at the point Connect to production MySQL server locally, the command is documented as:

mysql -u <admin_user>@<mysql_server_name> -h <mysql_server_name>.mysql.database.azure.com -P 3306 -p

This doesn't work and fails with the following message:

ERROR 1045 (28000): Access denied for user '<USER>'@'<IP_ADDRESS>' (using password: YES)

Because SSL verification is required, as documented here.

The correct command (after following prior instructions in the same article) is as follows:

  1. download the .pem file as documented here
  2. add --ssl-mode=REQUIRED and --ssl-ca=
mysql -u <admin_user>@<mysql_server_name> -h <mysql_server_name>.mysql.database.azure.com -P 3306 -p<PASSWORD> --ssl-mode=REQUIRED --ssl-ca=<PATH_TO_PEM>

Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri3 app-servicsvc cxp doc-bug triaged

All 2 comments

@RobertoPrevato
Thanks for your feedback! We will investigate and update as appropriate.

@RobertoPrevato Thank you for bringing up this doc bug. We have made the suggested changes and those should be public in 24 hours.

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

behnam89 picture behnam89  Â·  3Comments

ianpowell2017 picture ianpowell2017  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

monteledwards picture monteledwards  Â·  3Comments

Agazoth picture Agazoth  Â·  3Comments