Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Tutorials
    • All tutorials
        • Overview
        • Transferring data using Data Transfer
        • Migrating data using a logical dump
      • Managed Service for MySQL® performance analysis and optimization
      • Syncing data from a third-party MySQL® cluster to Managed Service for MySQL® using Data Transfer
      • Migrating a database from Managed Service for MySQL® to a third-party MySQL® cluster
      • Migrating a database from Managed Service for MySQL® to Object Storage using Data Transfer
      • Migrating a database from Managed Service for MySQL® to Managed Service for YDB using Data Transfer
      • Migrating data from Managed Service for MySQL® to Managed Service for PostgreSQL using Data Transfer
      • Migrating data from AWS RDS for PostgreSQL to Managed Service for PostgreSQL using Data Transfer
      • Migrating data from Managed Service for MySQL® to Yandex MPP Analytics for PostgreSQL using Data Transfer
      • Migrating data from Object Storage to Managed Service for MySQL® via Data Transfer
      • Delivering data from Managed Service for MySQL® to Managed Service for Apache Kafka® using Data Transfer
      • Delivering data from Managed Service for MySQL® to Managed Service for Apache Kafka® using Debezium
      • MySQL® change data capture and delivery to YDS

In this article:

  • Getting started
  • Required paid resources
  • Start the data transfer
  • Complete the data transfer
  • Delete the resources you created
  1. Building a data platform
  2. MySQL®
  3. Migrating a database from a third-party MySQL® cluster to a Managed Service for MySQL® cluster
  4. Transferring data using Data Transfer

Transferring data using Data Transfer

Written by
Yandex Cloud
Updated at November 26, 2026
View in Markdown
  • Getting started
    • Required paid resources
  • Start the data transfer
  • Complete the data transfer
  • Delete the resources you created

To migrate a database from MySQL® to Managed Service for MySQL® using Yandex Data Transfer:

  1. Start the data transfer.
  2. Complete the data transfer.

If you no longer need the resources you created, delete them.

Getting startedGetting started

Sign up for Yandex Cloud and create a billing account:

  1. Navigate to the management console and log in to Yandex Cloud or create a new account.
  2. On the Yandex Cloud Billing page, make sure you have a billing account linked and it has the ACTIVE or TRIAL_ACTIVE status. If you do not have a billing account, create one and link a cloud to it.

If you have an active billing account, you can create or select a folder for your infrastructure on the cloud page.

Learn more about clouds and folders here.

Required paid resourcesRequired paid resources

  • Managed Service for MySQL® cluster: computing resources allocated to hosts, storage and backup size (see Managed Service for MySQL® pricing).
  • Public IP addresses if public access is enabled for cluster hosts (see Virtual Private Cloud pricing).
  • Each transfer: use of computing resources and the number of transferred data rows (see Data Transfer pricing).

Start the data transferStart the data transfer

  1. Prepare the source cluster.

  2. Prepare the infrastructure and start the data transfer:

    Manually
    Terraform
    1. Create a target Managed Service for MySQL® cluster with your preferred configuration. In this case, the following applies:

      • The MySQL® version must be the same or higher than the version in the source cluster.

        Data transfer with a major MySQL® version upgrade is possible but not guaranteed. For more information, see this MySQL® guide.

        Migration with a MySQL® version downgrade is not supported.

      • SQL mode must be the same as in the source cluster.

    2. Prepare the target cluster.

    3. Create a source endpoint:

      • Direction: Source.

      • Name the endpoint.

      • Database type: MySQL.

      • Endpoint parameters:

        • Connection type: Select Self-managed.
        • Connection settings: Select Custom installation.
        • Host: Specify the IP address or FQDN of your target host.
        • Port: Specify the port number for connection to the source cluster.
        • Database: Specify the database name for your on-premise installation.
        • User: Specify the username Data Transfer will use to connect to the database.
        • Password: Enter the user password.
    4. Create a target endpoint:

      • Direction: Target.

      • Name the endpoint.

      • Database type: MySQL.

      • Endpoint parameters:

        • Connection type: Select Self-managed.
        • Connection settings: Select Managed Service for MySQL cluster.
        • Managed DB cluster: Select the target cluster from the list.
        • Database: Specify the database name in the target cluster.
        • User: Specify the username Data Transfer will use to connect to the database.
        • Password: Enter the user password.
    5. Create a Snapshot and increment-type transfer and configure it to use the previously created endpoints.

    6. Activate the transfer.

      Warning

      Do not make any schema changes in the source or target cluster during the transfer. For details, see Working with databases during transfer.

    1. Prepare the source cluster.

    2. If you do not have Terraform yet, install it.

    3. Get the authentication credentials. You can add them to environment variables or specify them later in the provider configuration file.

    4. Configure and initialize a provider. Instead of manually creating the provider configuration file, you can download it.

    5. Place the configuration file in a separate working directory and specify the parameter values. If you have not added the authentication credentials to environment variables, specify them in the configuration file.

    6. Download the data-transfer-mysql-mmy.tf configuration file to your current working directory.

      This file describes:

      • Network.
      • Subnet.
      • Security group and the rule allowing inbound cluster connections.
      • Managed Service for MySQL® target cluster.
      • Source endpoint.
      • Target endpoint.
      • Transfer.
    7. In data-transfer-mysql-mmy.tf, specify the following:

      • Source endpoint settings.

      • Target endpoint settings inherited from the target cluster configuration:

        • target_mysql_version: MySQL® version. This version must be the same or higher than the version in the source cluster.
        • target_sql_mode: SQL mode. It must be the same as in the source cluster.
        • target_db_name: Database name.
        • target_user and target_password: Username and password of the database owner.
    8. Validate your Terraform configuration files using this command:

      terraform validate
      

      Terraform will display any configuration errors detected in your files.

    9. Create the required infrastructure:

      1. Run this command to view the intended changes:

        terraform plan
        

        If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

      2. If everything looks correct, apply the changes:

        1. Run this command:

          terraform apply
          
        2. Confirm updating the resources.

        3. Wait for the operation to complete.

      All the required resources will be created in the specified folder. You can check resource availability and their settings in the management console.

      Once created, the transfer becomes active automatically.

Complete the data transferComplete the data transfer

  1. Wait for the transfer status to change to Replicating.

  2. Switch the source cluster to read-only mode and transfer the workload to the target cluster.

  3. On the transfer monitoring page, wait for the Maximum data transfer delay metric to drop to zero. This means that all changes made in the source cluster after the initial data copy have been transferred to the target cluster.

  4. Deactivate the transfer and wait for its status to change to Stopped.

    For more information about transfer statuses, see Transfer lifecycle.

Delete the resources you createdDelete the resources you created

Some resources are not free of charge. Delete the resources you no longer need, so you will not be charged for them:

Manually
Terraform
  1. Once the transfer is stopped, delete it.

  2. Delete the source and target endpoints.

  3. Delete the Managed Service for MySQL® cluster.

  4. If static public IP addresses were used for accessing the cluster hosts, release and delete them.

  1. In the terminal window, go to the directory containing the infrastructure plan.

    Warning

    Make sure the directory has no Terraform manifests with the resources you want to keep. Terraform deletes all resources that were created using the manifests in the current directory.

  2. Delete resources:

    1. Run this command:

      terraform destroy
      
    2. Confirm deleting the resources and wait for the operation to complete.

    All the resources described in the Terraform manifests will be deleted.

For a real example of MySQL® database migration using Data Transfer, see Syncing MySQL data using Yandex Data Transfer.

Useful linksUseful links

  • Transferring data by creating and restoring a logical dump

Was the article helpful?

Previous
Overview
Next
Migrating data using a logical dump
© 2026 Direct Cursus Technology L.L.C.