I am trying to connect to the azure mysql flexible-server from MySQL workbench / azure-cli but have not been successful.
I have allowed connections to the server from my current IP. I followed the instructions on the Azure connections page and receive the error "unable to connect to localhost". I tried connecting from powershell using mysql command and receive the error 2003 (10060). I also tried connecting to server using azure-cli in docker container. I allowed connections to server from IP of container and logged in using "az login". I could run certain commands like "az mysql flexible-server db show" that would work, but when running "az mysql flexible-server connect ..." I would get timeout error. [
](ht
tps://i.stack.imgur.com/cLZA5.png)
While connecting Azure MySQL Flexible server with My SQL Workbench, the errors shows that
unable to connect to localhostcheck with the user name provided in the Azure MySQL and also check the server name while replacing it intoHostname.Follow the below steps to connect Azure MySQL Flexible server with MySQL Workbench:
Click on
+which is besideMySQL Connectionsin MySQL Workbench.Provide
Connection Name,Hostname,usernameandpasswordwhich you have given in Azure MySQL Flexible Server.Click on
Test Connectionto check the connection if it is successful then it shows Successfully made the MySQL Connection as shown below.Then it successfully opens MySQL Workbench as shown below.
And also after creation of MySql Flexible server in Azure it shows how to connect with MySQL Workbench under settings in
connectoption and what values are need to replaced with as shown below.