0

I have created one Azure Database for MySQL flexible server. I have setup connectivity method as 'Public Access (allowed IP address)'. I have setup firewall rule and added my laptop IP address. I'm trying to connect to this Azure Database for MySQL from MySQL Workbench. But I'm getting below error.

Can't connect to MySQL server on '<server_name>.mysql.database.azure.com' (10060)

I have enabled the port 3306 on my laptop. I tried to connect to the Azure MySQL server from different systems but it's giving same error. When I'm connecting to this Azure MySQl server from Azure Cloud Shell, it's connecting properly. So is there any configuration required for Azure MySQL Server resource to connect it remotely from on-prem systems?

I tried all optiosn of whitelisting IP address, enabling the 3306 port, ping command, telnet. But it's not communicate to Azure MySQL server from on-prem system.

Ajit Medhekar
  • 1,018
  • 1
  • 10
  • 39

1 Answers1

0

To connect Azure MySQL Flexible server with on-premises MySQL Workbench when firewall is not enabled.

  • Even though you allowed public access on your server make sure you add your client address or allow full range of IP like 0.0.0.0 - 255.255.255.255 img1

  • Launch your MySQL workbench go to Database >> manage connection and create new connection and the then provide values like below and test connection:

Connection Name : Demo Connection
Connection Method : Standard (TCP/IP)
Hostname : _server name_(mydemoserver.mysql.database.azure.com) 
Port : 3306
Username : _server admin login name_
Password : your password

enter image description here

Pratik Lad
  • 4,343
  • 2
  • 3
  • 11