question

SR-7559 avatar image
0 Votes"
SR-7559 asked SR-7559 answered

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

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://docs.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking

azure-database-mysql
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SR-7559 avatar image
0 Votes"
SR-7559 answered

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OuryBa-MSFT avatar image
0 Votes"
OuryBa-MSFT answered OuryBa-MSFT converted comment to answer

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://docs.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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Well, I want to connect to the flexible server from an on Prem machine/client and fqdn does not work for onprem clients.

(We have a VPN between onprem to azure)

Or, will not be able to connect to flexible server from onprem resources?

0 Votes 0 ·
OuryBa-MSFT avatar image
0 Votes"
OuryBa-MSFT answered

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



image.png (121.4 KiB)
image.png (135.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.