Configure network connectivity for Cloud SQL for MySQL sources

This page describes how to configure network connectivity for Cloud SQL for MySQL sources for homogeneous migrations to Cloud SQL for MySQL migrations with Database Migration Service. There are two different methods you can use:

For homogeneous migrations between two Cloud SQL for MySQL instances with Database Migration Service, we don't recommend using the reverse-SSH tunnel connectivity method.

Configure Private Service Connect interfaces

This connectivity method lets you connect to the private IP of your source database without consuming VPC peering quota. Private Service Connect interfaces are only available when you migrate to an existing instance.

To use private connectivity with Private Service Connect interfaces, follow these steps:

  1. In your project, ensure you have a Virtual Private Cloud network with Virtual Private Cloud network with private services access enabled.

    This is the network that you peer with Database Migration Service and your source database server. You need to have enough space to allocate IP ranges for both components.

  2. Make sure your source Cloud SQL instance is configured with a private IP and Private Service Access (PSA) with the VPC network described in the previous step. For more information, see Use private IP in the Cloud SQL documentation.
  3. Create a destination Cloud SQL instance enabled for Private Service Connect. See Create a Private Service Connect-enabled instance in the Cloud SQL documentation.
  4. Configure Private Service Connect for outbound connectivity on your destination instance. At a high level, this process involves:
    1. Creating a network attachment in the VPC network where your source instance has a private IP address with PSA. 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 in the Cloud SQL documentation.

  5. At a later stage, when you create the source connection profile use the private IP address of your source Cloud SQL for MySQL instance.
  6. When you create the migration job select PSC interface for your connectivity method.

Configure specialized VPC peering

Private connectivity with Cloud SQL for MySQL sources for heterogeneous migrations uses Virtual Private Cloud (VPC) peering to create a connection between Database Migration Service and your source database over VPC networks in Google Cloud. Transitive peering isn't supported, so for this connectivity method to work, you need to set up a reverse proxy Virtual Machine (VM) in your Virtual Private Cloud network.

To use private connectivity with VPC peering, follow these steps:

  1. In your project, ensure you have a Virtual Private Cloud network with Virtual Private Cloud network with private services access enabled.

    This is the network that you peer with Database Migration Service and your source database server. You need to have enough space to allocate IP ranges for both components.

  2. Make sure your source Cloud SQL instance is configured with a private IP and Private Service Access (PSA) with the VPC network described in the previous step. For more information, see Use private IP in the Cloud SQL documentation.
  3. At a later stage, when you create the source connection profile, do the following:
    1. In the Define connection details section, enter the private IP of your source Cloud SQL instance.

      You can view your instance's private IP address when you view instance summary information.

    2. In the Define connectivity method section, select Private connectivity.
    3. From the drop-down menu, select the private connectivity configuration you created in the previous step.

Configure IP allowlist connectivity

To configure IP allowlist connectivity for Cloud SQL for MySQL sources, follow these steps:

  1. Enable public IP for your source Cloud SQL instance and add the outbound public IP of your destination instance to the list of authorized networks. For more information, see Enable public IP 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. At a later stage, when you create the source connection profile use the public IP address of your source instance.
  3. When you create the migration job select IP allowlist for your connectivity method.

What's next