Changing network connectivity options for Azure Database for MySQL - Flexible Server

Published Jun 15 2022 03:15 PM 777 Views
Microsoft

Overview 

 

Ensuring secure connectivity to a database server hosted in the cloud is one of the critical requirements for any customer. Currently, Azure Database for MySQL – Flexible Server customers can choose one of two network connectivity options: Public access (allowed IP addresses) or Private access (VNet Integration). 

 

These network connectivity options provide you with great flexibility when defining how users can connect to an Azure Database for MySQL flexible server. However, should you later decide that you want to implement the alternate connectivity option, it can be challenging to make the change. However, there’s a workaround that makes it easier to change the network connectivity option you are using for your MySQL flexible server, and this blog post will explain the process. 

 

Scenarios 

 

If you’ve provisioned a MySQL flexible server and decide that you want to change the connectivity option or switch from one virtual network (VNet) to another, begin by creating a new server using the Restore feature. Then, you can set up the new server with the desired configuration. 

 

This technique will enable you to change from: 

  • Public access to Private access. 
  • Private access to Public access. 
  • One VNet to another, for servers configured with Private access.

 

Changing connectivity options 

 

To begin the process, perform the following steps: 

  1. In the Azure portal, choose the existing flexible server instance that you want to update. 
  2. On the Overview page, select Restore. 
  3. The Restore page appears, with an option to choose Geo-restore to create a server in the paired  region or Point-in-time restore (PITR) to create a server in the same region. 
  4. Select the restore option that meets your needs, and then, in the Restore to new server text box, specify a name for the new server. 
  5. Navigate to the Networking tab. 

Networking-tab.png

 

Now, based on the scenario you’re implementing, the steps diverge. To complete the process, see the details in the section below that corresponds to the task you want to accomplish. 

 

Changing from Public access to Private access

 

  1. For the Connectivity method, select Private access (VNet Integration). 
  2. In the Virtual Network section, either select an existing VNet and subnet that is delegated to Microsoft.DBforMySQL/flexibleServers or create a new VNet by selecting create virtual network link. 
  3. Create a new or select an existing Private DNS Zone. 
  4. Select Review + create to review your flexible server configuration. 
  5. Finally, select Create to provision the server. 

Provisioning can take a few minutes. 

 

Changing from Private access to Public access

 

  1. For the Connectivity method, select Public access (allowed IP addresses). The Firewall rules section will be grayed out during server creation. 
  2. Select Review + create to review your flexible server configuration. 
  3. Finally, select Create to provision the server. 

Provisioning can take a few minutes. When the process is complete, you can modify and save firewall rules. 

 

Changing VNets for servers configured with Private access

 

a. Under Virtual network, just below the Virtual network field, select Create virtual network. 

Networking Snapshot1c.png

 

b. In the Create virtual network dialog box, define a new virtual network by selecting one from the multiple allowed addresses and then creating a subnet. 

Switch VNet Image2b.png

 

c. Select OK.

 

Summary

 

While it’s important that you select the best connectivity option for your security and compliance needs while provisioning the server, there are alternatives for changing the connectivity options should you later find the need to do so. Consider spinning up a new server using the Restore capability, and then configure connectivity to meet your present requirements. 

 

For more information, see the following resources: 

 

If you have any feedback or questions about the information provided above, please leave a comment below or email us at AskAzureDBforMySQL@service.microsoft.com. Thank you! 

Co-Authors
Version history
Last update:
‎Jun 27 2022 11:57 AM
Updated by: