tencent cloud

Data Transfer Service

Account Migration

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-05-29 11:05:43

Scenarios

This scenario guides you on how to migrate user information from the source database to the target database.
Note:
Currently supported scenarios for account migration include data migration from MySQL > MySQL and from MySQL > TDSQL-C.

Must-Knows

1. During account migration, DTS checks the account information in the source database. It migrates accounts that meet the requirements, while accounts that do not meet the requirements are either not migrated or migrated with downgraded privileges. The account check results are categorized as follows.
Normal Migration: The account information meets the check requirements and can be migrated normally.
Privilege Downgrade: If only some privileges meet the check requirements, only those that meet the requirements are migrated, while those that do not meet the requirements are not migrated.
DTS supports privilege migration only at the database and global levels. It does not support migration at other levels, such as table, stored procedure, or column levels. For example, if an account in the source database has both database-level and table-level privileges, only the database-level privileges of this account are migrated to the target database.
If the account used to execute the migration task lacks corresponding permissions (only for database and global levels) in the target database, the migration is not supported. For example, if the account lacks the DELETE permission in the target database, the DELETE permission of the account in the source database is not migrated.
Non-migratable: The account information does not meet the requirements and cannot be migrated. For details, see Constraints.
2. If the same account information exists in both the source and target databases, DTS merges the information based on the source database and overwrites the account information in the target database.
If the source and target databases have accounts with the same user and host but different passwords, the password of the account in the target database is overwritten by the source password after account migration. This does not apply to the account used to execute the migration task.
If the account to be migrated in the source database has the same information as the account used to execute the migration task, the following attributes of the source account are overwritten to the target database, which may affect the performance of the migration task: MAX_QUERIES_PER_HOUR, MAX_UPDATES_PER_HOUR, MAX_CONNECTIONS_PER_HOUR, MAX_USER_CONNECTIONS, PASSWORD EXPIRE status, and ACCOUNT LOCK status.
The overwrite rule for account resource limit attributes (MAX_QUERIES_PER_HOUR, MAX_UPDATES_PER_HOUR, MAX_CONNECTIONS_PER_HOUR, MAX_USER_CONNECTIONS): The target end is overwritten only when the corresponding attribute value of the source account is not 0. When the corresponding attribute value of the source account is 0 (indicating no limit), the original value on the target end is not overwritten.
If an account to be migrated in the source database has the same user/host as the account used to execute the migration task but a different password, the check task reports an error. You must modify the passwords to be consistent before executing the migration task.
3. Account migration is not affected by database and table mapping.

Constraints

1. System accounts of Alibaba Cloud instances cannot be migrated. This includes "replicator", "aurora", "aurora_proxy", "root", and "aliyun_root".
2. When account migration is performed for Alibaba Cloud instances, DTS first obtains user data from the mysql.user table. If the mysql.user table does not exist, DTS obtains the data from mysql.user_view. If the mysql.user_view lacks password column information, account migration cannot be performed.
3. MySQL 8.0 version-specific limitations.
Account migration with dynamic privileges is not supported when the source database is MySQL 8.0.
When the target database is MySQL 8.0, if a stored procedure for the account exists in the target database, the CREATE USER statement reports an error because DTS currently does not support stored procedure migration. In this case, you must first delete the corresponding account on the target end and then re-execute the migration task.
When the target database is MySQL 8.0, if an account to be migrated has the SYSTEM_USER privilege in the source database but the account used to execute the migration task does not have the SYSTEM_USER privilege, migration of such accounts is not supported.
4. Account migration is not supported when the target database is MySQL 5.5 or 5.6 and the account used to execute the migration task lacks the with grant option privilege.
5. Roles created in the source database are migrated according to user logic. However, if a user has the privileges of a role, that user is not migrated.
6. System account migration is not supported. Examples include mysql.
7. Migration of Proxy Users (proxy users) is not supported.
8. If special characters (such as the hexadecimal 0x00 symbol) exist in the source database account, the account migration task may report an error.

Operation Steps

1. On the Set Migration Options and Select Migration Objects page of the Data Migration Task, select whether to migrate accounts.

2. The check task inspects account information in the source database and migrates accounts that meet the requirements.
3. Click View Details to view detailed account migration results.
Normal Migration: The account information meets the check requirements and can be migrated normally.
Privilege Downgrade: If only some privileges meet the check requirements, only those that meet the requirements are migrated, while those that do not meet the requirements are not migrated.
Non-migratable: The account information does not meet the check requirements and cannot be migrated. The specific reasons are as follows:
System users of Alibaba Cloud databases, or scenarios where user account password information cannot be obtained.
Dynamic privilege accounts in MySQL 8.0. In the source database MySQL 8.0, the account to be migrated has the SYSTEM_USER privilege, but the account used to execute the migration task does not have the SYSTEM_USER privilege.
When the target database is MySQL 5.5 or 5.6, the account used to execute the migration task does not have the grant privilege.
System accounts, such as mysql, sqlserver, and oracle.
Proxy User (proxy user).
System issues such as DTS being unable to parse.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan