Help Center/ Data Replication Service/ Troubleshooting/ Solutions to Failed Check Items/ Database User Permissions/ Checking Whether the Destination Database User Has Sufficient Permissions
Updated on 2024-11-30 GMT+08:00

Checking Whether the Destination Database User Has Sufficient Permissions

Check whether the destination database user has sufficient permissions. The destination database user permissions required in the full and incremental phases vary depending on the DB engine.

Failure Cause

The destination database user does not have sufficient permissions.

Handling Suggestion

When you use DRS to migrate or synchronize data, the destination database user must have required permissions. Tasks of different DB engines require different account permissions. DRS automatically checks the database account permissions in the pre-check phase and provides handling suggestions.

Take the MySQL migration as an example. The destination database user permissions are as follows:

SELECT, CREATE, ALTER, DROP, DELETE, INSERT, UPDATE, INDEX, EVENT, CREATE VIEW, CREATE ROUTINE, TRIGGER, REFERENCES, and WITH GRANT OPTION. If the destination database version is in the range 8.0.14 to 8.0.18, the SESSION_VARIABLES_ADMIN permission is required.

Reference statement: GRANTSELECT, CREATE, ALTER, DROP, DELETE, INSERT, UPDATE, INDEX, EVENT, CREATE VIEW, CREATE ROUTINE, TRIGGER, REFERENCES ON [Databases to be migrated].* TO 'user1' WITH GRANT OPTION;