Migrate to OVHcloud Public Cloud Databases for MySQL

Knowledge Base

Migrate to OVHcloud Public Cloud Databases for MySQL


Icons/System/eye-open Created with Sketch. 16 Views 12.12.2025 MySQL

Objective

This guide explain how to migrate an external MySQL database to an OVHcloud MySQL Public Cloud Databases service.

Requirements

Instructions

Prerequisites

  • The source database should be in >= 5.7 and <= 8.0.
  • gtid_mode is ON on both the source and the target (ON by default on Public Cloud MySQL database).
  • A user with read and replication data permission can be created on the source database.

Set up

  • Create a managed MySQL database in your Public Cloud project.
  • Create a user on the source database with replication and read data permissions.

Using the OVHcloud API

  • First, create a task to check if the migration is possible.
body : {
   "sourceHost": <hostmane>,
   "sourcePassword": <replication user password>,
   "sourcePort": 3306,
   "sourceSsl": true,
   "sourceUsername": <replication user name>
}
  • Then get the result of the migration check task with the following API call:

If the Success field is true you can continue. If not, you can see the reason in the result field.

  • Create a task to migrate the external database to the managed database:
body : {
   "sourceHost": <hostmane>,
   "sourcePassword": <replication user password>,
   "sourcePort": 3306,
   "sourceSsl": true,
   "sourceUsername": <replication user name>
}
  • Get the result of the migration:

When the migration is finished, the task continues to replicate the source database. You need to stop it with the following request to fully finish the process. Be careful, if you do not do it and delete data in the source database, these updates will be replicated to the target database.

Users

Curently the users are not migrated in this process and need to be recreated in the managed database manually.

Go further

Visit our dedicated Discord channel: https://discord.gg/ovhcloud. Ask questions, provide feedback and interact directly with the team that builds our databases services.

If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.

Join our community of users.

Related articles