Connecting to Azure MySQL server through Cloud Shell

jolateh 21 Reputation points
2021-06-26T23:50:50.19+00:00

I followed this guide to connect to the Azure MySQL server through cloud shell. However, when attempting to login with the command:

mysql -h salmon-project.database.windows.net -u djangouser@salmon-project -p

I get the error:

ERROR 9002 (28000): The server name you tried cannot be found: salmon-project. Please check the Username and retry connection. The Username should be in <username@hostname> format.

I don't understand why cloud shell can't find my server.

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
986 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anurag Sharma 17,631 Reputation points
    2021-06-27T13:58:50.98+00:00

    Hi @jolateh , welcome to Microsoft Q&A forum.

    The host that you are trying to connect is Azure SQL Server where the command you are using is for Azure MySQL Database. Please check below:

    Azure Database for MySQL should be in this format: xxxxxxx.mysql.database.azure.com
    Azure SQL Server should be in this format: xxxxxxx.database.windows.net

    You can once check the server name as highlighted in below screenshot:

    109663-image.png

    ----------

    If answer helps, please mark it 'Accept Answer'

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.