Connection between MySQL Flexible Server and VM via different Virtual Networks

Ramkumar S 25 Reputation points
2024-01-20T04:05:55+00:00

Created a MySQL Flexible Server in virtual network without any public access and only private access. Created a VM in a separate virtual network (was not able to use the one used for MySQL server). I am not able to access the database from the VM. Have tried to peer the Virtual Networks without any success. If anyone can point me to the correct documentation, it will be helpful.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
Azure Database for MySQL
0 comments No comments
{count} votes

Answer accepted by question author
  1. Luis Arias 9,481 Reputation points Volunteer Moderator
    2024-01-20T17:35:39.98+00:00

    Hi Ramkumar S, It looks ike you are already configure the documentation recomendation (https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking-vnet#private-access-virtual-network-integration) , In your vnet peering verify the status is connected. User's image

    The last step in order to complete this communication between peerings you need to create a private dns zone a link to the second vnet as you can follow here:

    1. How to create private dns zone https://learn.microsoft.com/en-us/azure/dns/private-dns-getstarted-portal
    2. Use the name mysql.database.azure.com https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking-vnet#private-dns-zone-and-virtual-network-peering

    Let me know if you need further assitance here. Luis


    If the information helped address your question, please Accept the answer.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.