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:
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>
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@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.