Stay organized with collections Save and categorize content based on your preferences.
Database Migration Service supports one-time and continuous migrations from source databases to Cloud SQL destination databases.
Supported source databases for MySQL include:
For MySQL 8.0 sources, Database Migration Service also supports the following minor versions: 8.0.18, 8.0.26, 8.0.27, 8.0.28, 8.0.30, 8.0.31, 8.0.32, 8.0.33, 8.0.34, 8.0.35, 8.0.36, 8.0.37, 8.0.39, 8.0.40, 8.0.41, 8.0.42.
To configure a source database, complete the following steps:
mysql
, performance_schema
, information_schema
, ndbinfo
, or sys
system schemas, ensure that the replica databases also contain these system schema tables.
If the replica databases don't have these tables, your migration job might fail with the Unknown table in system schema
error.
GTID_MODE
to ON
or OFF
. The GTID_MODE
value of ON_PERMISSIVE
isn't supported.
The value you should use depends on the migration requirements:
GTID_MODE
to ON
.GTID_MODE
to ON
.GTID_MODE
, see Global Transaction ID System Variable.You must configure the user account used to connect to the source database to accept connections from anywhere (host = %
). Access can be restricted to this user in a later step.
To limit the possibility of compromising other aspects of the database, we recommend that you create a separate account for this purpose.
There are four types of combinations of migrations and dumps:
Privileges for each type of migration and dump combination are listed in the tabs below.
Type 1The user account that you configure must have the following privileges:
REPLICATION SLAVE
EXECUTE
SELECT
SHOW VIEW
REPLICATION CLIENT
RELOAD
TRIGGER
LOCK TABLES
MySQL version 8.0 or later: For optimal performance, make sure you don't grant the BACKUP_ADMIN
privilege to this account.
For more information on privileges, see Privileges Provided by MySQL. For more information about user accounts, see MySQL user account format.
Type 2The user account that you configure must have the following privileges:
REPLICATION SLAVE
EXECUTE
For more information on privileges, see Privileges Provided by MySQL. For more information about user accounts, see MySQL user account format.
Type 3The user account that you configure must have the following privileges:
SELECT
SHOW VIEW
TRIGGER
LOCK TABLES
GTID_MODE = ON
setting only)RELOAD
MySQL version 8.0 or later: For optimal performance, make sure you don't grant the BACKUP_ADMIN
privilege to this account.
For more information on privileges, see Privileges Provided by MySQL. For more information about user accounts, see MySQL user account format.
Type 4No privileges are required.
For more information on privileges, see Privileges Provided by MySQL. For more information about user accounts, see MySQL user account format.
To configure binary logs, expand the section for your source:
Self-hosted MySQLDepending on your MySQL version, specify a period with enough time for replication to occur:
expire_logs_days
expire_logs_days
, binlog_expire_logs_seconds
Binary logging is enabled by default on Microsoft Azure Database for MySQL. You don't need to enable it. For more information, see the Microsoft documentation.
Configure the following required parameters:
Set binlog_expire_logs_seconds
to a period that is long enough to support the database migration.
For more information, see Configure server parameters in Azure Database for PostgreSQL and the binlog_expire_logs_seconds
parameter in the Microsoft documentation.
For Amazon RDS, you set row-based configuration in the parameter group by configuring the binlog retention hours
parameter. This parameter is used to specify how many hours Amazon RDS should retain binary log files.
To set the retention period for binary logs in Amazon RDS, use the mysql.rds_set_configuration
stored procedure and specify a period with enough time for replication to occur. For example:
call mysql.rds_set_configuration('binlog retention hours',168);The maximum value that you can set for this parameter is
168
hours (or 7 days). Amazon Aurora
For Amazon Aurora, follow these steps:
mysql> call mysql.rds_set_configuration('binlog retention hours', 168);You're entering this command because you want to ensure proper replication by configuring your system to retain binary logs for a minimum of 7 days (or 168 hours).
For more information about InnoDB, see The InnoDB Storage Engine. For more information about converting to InnoDB, see Converting Tables from MyISAM to InnoDB.
For more information about the MySQL user password length limitation, see MySQL Bug #43439.
For Microsoft Azure Database for MySQL sources only: Check the value of your require_secure_transport
setting.
By default, Microsoft Azure databases require SSL/TLS encryption for all incoming connections. Depending on the require_secure_transport
value, use one of the following encryption settings when you create the source connection profile:
require_secure_transport
is set to on
, select Basic, TLS, or mTLS.require_secure_transport
is set to off
, select None.Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[[["Database Migration Service facilitates both one-time and continuous migrations from various MySQL source databases to Cloud SQL destination databases."],["Supported MySQL sources include Amazon RDS, self-managed MySQL, Cloud SQL for MySQL, Amazon Aurora, and Microsoft Azure Database for MySQL, with specific version and minor version compatibility listed."],["Before migrating data, it's critical to halt all Data Definition Language (DDL) write operations during the full dump phase, with the option to resume DDL operations once the migration enters the CDC phase."],["Configuring the user account with appropriate privileges is crucial, with requirements varying based on the type of migration and whether a managed or manual dump is used, including different privileges such as REPLICATION SLAVE, EXECUTE, SELECT, and others."],["Proper setup of binary logs is necessary, involving enabling them, using row-based logging, and setting a retention period of at least a week for sources such as Self-hosted MySQL, Microsoft Azure Database for MySQL, and Amazon RDS/Aurora."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4