This page describes how to configure network connectivity for Microsoft Azure SQL Managed Instance
sources for homogeneous migrations to Cloud SQL for MySQL
migrations with Database Migration Service. There are several methods you can use:

- [Private IP connectivity with Private Service Connect interfaces](https://docs.cloud.google.com/database-migration/docs/mysql/configure-src-connection-azure.md.txt#psc-interfaces)

- [Private IP connectivity with Virtual Private Cloud peering](https://docs.cloud.google.com/database-migration/docs/mysql/configure-src-connection-azure.md.txt#vpc-peering)

- [Public IP allowlist](https://docs.cloud.google.com/database-migration/docs/mysql/configure-src-connection-azure.md.txt#ip-allowlist)

You can also use a
[reverse-SSH tunnel](https://docs.cloud.google.com/database-migration/docs/mysql/configure-connectivity-reverse-ssh-tunnel.md.txt), but this approach requires creating
additional Virtual Machines (VMs) to host the necessary network components.

## Configure Private Service Connect interfaces

To use private connectivity with Private Service Connect interfaces
for Microsoft Azure SQL Managed Instance sources, follow these steps:

1. Set up direct connectivity with Cloud VPN from Google Cloud to your
   source VPC.

   Depending on your network architecture, you might need to set up
   additional VPN gateways in your system. For more information, see
   [Create HA VPN connections between Google Cloud and Azure](https://docs.cloud.google.com/network-connectivity/docs/vpn/tutorials/create-ha-vpn-connections-google-cloud-azure.md.txt)
   in the Cloud VPN documentation.
2. Create a destination Cloud SQL instance enabled for Private Service Connect. See [Create a Private Service Connect-enabled instance](https://docs.cloud.google.com/sql/docs/mysql/configure-private-service-connect.md.txt#create-cloud-sql-instance-psc-enabled-2) in the Cloud SQL documentation.
3. Configure Private Service Connect for outbound connectivity on your instance. At a high level, this process involves:
   1. Creating a network attachment in the VPC network where you set up your Cloud VPN. Note that the subnet range reserved for the network attachment must be within RFC 1918 range.
   2. Assigning the network attachment to your destination Cloud SQL for MySQL instance.

   For the full process, see
   [Configure outbound connectivity](https://docs.cloud.google.com/sql/docs/mysql/configure-private-service-connect.md.txt#configure-outbound-connectivity) in the Cloud SQL documentation.
4. At a later stage, when you [create the source connection profile](https://docs.cloud.google.com/database-migration/docs/mysql/create-connection-profiles.md.txt) enter the private IP of your Microsoft Azure SQL Managed Instance source.
5. When you [create the migration job](https://docs.cloud.google.com/database-migration/docs/mysql/about-migration-jobs.md.txt) select **PSC interface** for your connectivity method.

## Configure VPC peering

To use private connectivity with Virtual Private Cloud peering for Microsoft Azure SQL Managed Instance
sources, follow these steps:

1. Set up direct connectivity with Cloud VPN to your
   Microsoft Azure SQL Managed Instance source.

   For more information, see
   [Create HA VPN connections between Google Cloud and Azure](https://docs.cloud.google.com/network-connectivity/docs/vpn/tutorials/create-ha-vpn-connections-google-cloud-azure.md.txt)
   in the Cloud VPN documentation.

   Ensure the Virtual Private Cloud network is configured for private services access.
   For more information, see
   [Configure private services access](https://docs.cloud.google.com/vpc/docs/configure-private-services-access.md.txt).
2. Make sure your destination Cloud SQL instance is configured to use a private IP with Private Service Access (PSA) and peered with the VPC where you have your Cloud VPN. For more information, see [Use private IP](https://docs.cloud.google.com/sql/docs/mysql/configure-private-ip#configure_an_instance_to_use_private_ip) in the Cloud SQL documentation.
3. At a later stage, when you [create the source connection profile](https://docs.cloud.google.com/database-migration/docs/mysql/create-connection-profiles.md.txt) enter the private IP of your Microsoft Azure SQL Managed Instance source.
4. When you [create the migration job](https://docs.cloud.google.com/database-migration/docs/mysql/about-migration-jobs.md.txt) select **VPC Peering** for your connectivity method.

## Configure IP allowlist connectivity

To use the public IP allowlist connectivity method for Microsoft Azure SQL Managed Instance
sources, follow these steps:

1. Enable public IP for your destination Cloud SQL instance.
   [Enable public IP](https://docs.cloud.google.com/sql/docs/mysql/configure-ip.md.txt) in the Cloud SQL documentation.

   If you are migrating to a new destination instance, make sure to
   create the destination with a public IP enabled.
2. Configure your source Microsoft Azure SQL Managed Instance to allow
   public network access from the public IP of your destination Cloud SQL
   instance.

   For more information, see
   [Change public network access](https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking-public) in the Microsoft documentation.
3. At a later stage, when you [create the source connection profile](https://docs.cloud.google.com/database-migration/docs/mysql/create-connection-profiles.md.txt) use your instance's fully qualified server name for the source database IP.

   For more information about how to view the connection details of
   your Microsoft Azure SQL Managed Instance instance, see
   [Get server connection information](https://learn.microsoft.com/en-us/azure/mysql/flexible-server/connect-workbench#get-connection-information) in the Microsoft
   documentation.
4. When you [create the migration job](https://docs.cloud.google.com/database-migration/docs/mysql/about-migration-jobs.md.txt) select **IP allowlist** for your connectivity method.

## What's next

- To learn more about database network connectivity in Database Migration Service, see
  [Networking methods overview](https://docs.cloud.google.com/database-migration/docs/mysql/networking-methods.md.txt).

- To get a complete, step-by-step migration walkthrough, see
  [Get started with Cloud SQL for MySQL migrations](https://docs.cloud.google.com/database-migration/docs/mysql/get-started-with-mysql-migrations.md.txt).