Create and manage virtual networks for Azure Database for MySQL Flexible Server using the Azure portal
APPLIES TO: Azure Database for MySQL - Flexible Server
Azure Database for MySQL Flexible Server supports two types of mutually exclusive network connectivity methods to connect to your flexible server. The two options are:
- Public access (allowed IP addresses)
- Private access (VNet Integration)
In this article, we will focus on creation of MySQL server with Private access (VNet Integration) using Azure portal. With Private access (VNet Integration), you can deploy your flexible server into your own Azure Virtual Network. Azure Virtual Networks provide private and secure network communication. With private access, connections to the MySQL server are restricted to your virtual network. To learn more about it, refer to Private access (VNet Integration).
You can deploy your flexible server into a virtual network and subnet during server creation. After the flexible server is deployed, you cannot move it into another virtual network, subnet or to Public access (allowed IP addresses).
To create a flexible server in a virtual network, you need:
The virtual network and subnet should be in the same region and subscription as your flexible server.
To delegate a subnet to Microsoft.DBforMySQL/flexibleServers. This delegation means that only Azure Database for MySQL Flexible Servers can use that subnet. No other Azure resource types can be in the delegated subnet.
Create Azure Database for MySQL Flexible Server in an already existing virtual network
Select Create a resource (+) in the upper-left corner of the portal.
Select Databases > Azure Database for MySQL. You can also enter MySQL in the search box to find the service.
Select Flexible server as the deployment option.
Fill out the Basics form
Go to the Networking tab.
In the Connectivity method, select Private access (VNet Integration). Go to Virtual Network section, you can either select an already existing virtual network and Subnet that is delegated to Microsoft.DBforMySQL/flexibleServers or create a new one by clicking the create virtual network link.
Only virtual networks and subnets in the same region and subscription will be listed in the drop down. The chosen subnet will be delegated to Microsoft.DBforMySQL/flexibleServers. It means that only Azure Database for MySQL Flexible Servers can use that subnet.
Create a new or Select an existing Private DNS Zone.
Private DNS zone names must end with
mysql.database.azure.com. If you do not see the option to create a new private dns zone, please enter the server name on the Basics tab. After the flexible server is deployed to a virtual network and subnet, you cannot move it to Public access (allowed IP addresses).
Select Review + create to review your flexible server configuration.
Select Create to provision the server. Provisioning can take a few minutes.