Connection to Azure MySQL server fails due to invalid connection string

When I try to connect to my MySQL server in Azure from the mysql client, I get the following error, although I am using the correct username and server name. How can i fix this?

The connection string may be incorrect. Please visit the portal for inquiries.

+4
source share
3 answers

When connecting to an Azure database server instance for MySQL, you need to follow the format <username@hostname>, regardless of whether you are running it from the mysqlexe client or the MySQL workbench. We recommend that you get the full connection string for your client from the Azure portal and use it when connecting to your MySQL server.

Read How to get connection information to learn more about how to connect to your MySQL server from different clients.

+13
source

I have the same problem and it looks like this is due to Shell MySQL. Not a classic mysql.exe command line tool. I am trying to connect to a MySQL Azure database from the MySQL shell as follows:

mysql-sql> \sql
mysql-sql> \connect -c myuser@myserver.mysql.database.azure.com
Creating a Classic Session to 'myuser@myserver.mysql.database.azure.com'
Enter password: *********
ERROR: 2001 (28000): The connection string may not be right. Please visit portal for references.
mysql-sql>

Azure ( ) "_ @servername", MySQL.

- Azure MySQL db MySQL?

, mysql.exe, :

mysql.exe -u myuser@myserver -h myserver.mysql.database.azure.com -p

, , MySQL at (@) .

+4

, @hostname .

+1
source

Source: https://habr.com/ru/post/1677397/


All Articles