MySQL flexible server on VNet - How to find the IP address?

SR-7559 141 Reputation points
2021-08-04T13:43:17.743+00:00

I have created succesfully an Azure Database for MySQL Flexible server (preview) on a VNet (without "public" access). Since it's on a VNet, need to know it's IP to connect to.

And yes, this server was created on a subnet with delegate feature enabled to Microsoft.DBForSQL/flexibleservers service.

Now, how do I retrieve it's IP on the subnet is assigned to this server (I do not see anything under 'Connected devices' for VNet)?

Retrieving private IP is not mentioned in this article - https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking

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

Accepted answer
  1. SR-7559 141 Reputation points
    2021-08-06T15:53:06.583+00:00

    I'd like to be able to connect from an on-prem PC to azure flex server that is in a VNet which is connected to our onprem network via VPN.

    So I had to tracert using FQDN from a VM in the same VNet as Flexible server and was able to get the IP of flex server.

    Oddly enough the number of ip addresses available (under subnet properties) does not account for the IP address that was allocated to this flex server.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Oury Ba-MSFT 20,926 Reputation points Microsoft Employee Moderator
    2021-08-04T21:15:33.323+00:00

    Hi @SR-7559 Thank you for posting your question on Microsoft Q&A. Why do you need IP address for? Are you trying to connect using IP? We do not recommend to use IP. For flexible server , we recommend to use FQDN.
    Please check the doc below for more info

    https://learn.microsoft.com/en-us/azure/mysql/flexible-server/quickstart-create-connect-server-vnet#connect-to-the-server-from-azure-linux-virtual-machine

    Let me know if you have additional queries. I will be more than happy to assist you.

    Regards,
    Oury


  2. Oury Ba-MSFT 20,926 Reputation points Microsoft Employee Moderator
    2021-08-05T00:51:58.343+00:00

    Hi @SR-7559 From my understanding, if you create a Flexible server on a VNET (without Public access) as you mentioned above, you will not see IP addresses under the networking tab as shown below.

    120651-image.png

    But if you create a Flexible server with public access you will see the below option under the networking tab in the Azure Portal
    120614-image.png

    If you server is in VNET, it can only connected from VM within the VNET. If flexible server is outside the VNET, it can be connected anywhere as long as the IP is allowed in the firewall rules. In both cases, would recommend to use FQDN to connect , not the IP.

    Please also check this blog, it will be very helpful to understand the Private access integration DNS configuration patterns for Azure PostgreSQL and also MYSQL flexible server

    Fell free to reach out if you still need further help

    Regards,
    Oury

    0 comments No comments

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.