Hi @massad
Azure Database for MySQL - Flexible sever supports only one connection option, either public access or private access
If you are connecting through public access-
Verify that the client IP address has been added on the server firewall. For purposes of temporary testing only, set up a firewall rule using 0.0.0.0
as the starting IP address and 255.255.255.255
as the ending IP address. This opens the server to all IP addresses. If this resolves the connectivity issue, remove this rule, and then create a firewall rule for an appropriately limited IP address or address range.
- Ping your server name and make sure that it returns a public IP address. Otherwise, the server should be in a VNet or dropped, or there is a network issue connecting this machine to the internet.
- Confirm that your network allows outbound connections on port 3306 (this port number can't be changed). Try to telnet to your server to verify the connectivity bu using the following commands:
- In PowerShell: Test-NetConnection -ComputerName SERVER_NAME -Port 3306
- In LinuxsShell: telnet SERVER_NAME 3306
- If you're connecting from an Azure virtual machine, check the network security group (NSG) rules to determine if they're blocking the connection. Also, check the route table to see if there's any VPN device that needs to be configured. For Private access-
Azure Database for MySQL - Flexible Server integrates with Azure Private DNS zones to provide a reliable, secure DNS service to manage and resolve domain names in a virtual network without the need to add a custom DNS solution. A private DNS zone can be linked to one or more virtual networks by creating virtual network links.
For such connectivity issue, please follow Troubleshoot connection issues to Azure Database for MySQL - Flexible Server document
Thank you!