Help Center> Data Replication Service> User Guide> Check Items> Database User Permissions> Checking Whether the Destination Database User Has Sufficient Permissions

Checking Whether the Destination Database User Has Sufficient Permissions

MySQL Migration

Table 1 Checking whether the destination database user has sufficient permissions

Check Item

Whether the destination database user has sufficient permissions

Description

Check whether the destination database user permissions meet the migration requirements. If the permissions are insufficient, the migration will fail.

Failure Cause and Handling Suggestion

Failure cause: The destination database user must have the following permissions: SELECT, CREATE, DROP, DELETE, INSERT, UPDATE, INDEX, EVENT, CREATE VIEW, CREATE ROUTINE, TRIGGER, and WITH GRANT OPTION.

Handling suggestion: Check whether the destination database user permissions meet the migration requirements.

Failure cause: Insufficient user permissions

Handling suggestion: Check whether the database user permissions meet the migration requirements.

Failure cause: Internal error

Handling suggestion: Contact Huawei technical support.

PostgreSQL Migration

Table 2 Checking whether the destination database user has sufficient permissions

Check Item

Whether the destination database user has sufficient permissions

Description

Check whether the destination database user permissions meet the migration requirements. If the permissions are insufficient, the migration will fail.

Failure Cause and Handling Suggestion

Failure cause: This item cannot be checked because the destination database fails to be connected.

Handling suggestion: Check whether the destination database is connected.

MongoDB Database Migration

Table 3 Checking whether the destination database user has sufficient permissions

Check Item

Whether the destination database user has sufficient permissions

Description

Check whether the destination database user permissions meet the migration requirements. If the permissions are insufficient, the migration will fail.

Failure Cause and Handling Suggestion

Failure cause: This item cannot be checked because the destination database fails to be connected.

Handling suggestion: Check whether the destination database is connected.

Failure cause: Internal error

Handling suggestion: Contact Huawei technical support.

Oracle -> MySQL/Oracle -> GaussDB(for MySQL) Migration and Synchronization

Table 4 Checking whether the destination database user has sufficient permissions

Check Item

Whether the destination database user has sufficient permissions

Description

Check whether the destination database user permissions meet the migration requirements. If the permissions are insufficient, the migration will fail.

Failure Cause and Handling Suggestion

Failure cause: The destination database user must have the following permissions: SELECT, CREATE, DROP, DELETE, INSERT, UPDATE, INDEX, EVENT, RELOAD, CREATE VIEW, CREATE ROUTINE, TRIGGER, and ALTER.

Handling suggestion: Check whether the destination database user permissions meet the migration requirements.

Oracle -> PostgreSQL Migration

Table 5 Checking whether the destination database user has sufficient permissions

Check Item

Whether the destination database user has sufficient permissions

Description

Check whether the destination database user permissions meet the migration requirements. If the permissions are insufficient, the migration will fail.

Failure Cause and Handling Suggestion

Failure cause: The destination database user does not have sufficient permissions.

Handling suggestions: Run the following command to grant the permissions of creating databases and tables on the destination database. Then, perform the check again.

ALTER ROLE targetUser WITH CREATEDB;

In the preceding command, targetUser indicates the current user of the destination database.

MySQL -> PostgreSQL Synchronization

Table 6 Checking whether the destination database user has sufficient permissions

Check Item

Whether the destination database user has sufficient permissions

Description

Check whether the destination database user permissions meet the requirements for MySQL to PostgreSQL synchronization. If the permissions are insufficient, the synchronization will fail.

Failure Cause and Handling Suggestion

Failure cause: Some tables in the destination database do not have the INSERT, SELECT, UPDATE, and DELETE permissions.

Handling suggestion: Add the required permissions for the tables and try again.

Example command:

GRANT INSERT,SELECT,UPDATE, DELETE ON db_name.table_name TO 'user'@'host';

PostgreSQL > PostgreSQL Synchronization

Table 7 Checking whether the destination database user has sufficient permissions

Check Item

Whether the destination database user has sufficient permissions

Description

Check whether the destination database user permissions meet the requirements for PostgreSQL to PostgreSQL synchronization. If the permissions are insufficient, the synchronization will fail.

Failure Cause and Handling Suggestion

Failure cause: The destination database user must have the CREATEDB permission.

Handling suggestion: Grant the destination database user the CREATEDB permission.

ALTER ROLE role_name WITH CREATEDB;

MySQL Disaster Recovery

Table 8 Checking whether the destination database user has sufficient permissions

Check Item

Whether the destination database user has sufficient permissions

Description

Check whether the destination database user permissions meet the migration requirements. If the permissions are insufficient, the disaster recovery will fail.

Failure Cause and Handling Suggestion

Failure cause: The source database user must have the GRANT permission.

Handling suggestion: Grant user the required permission.

GRANT SELECT, CREATE, DROP, DELETE, INSERT, UPDATE, SHOW VIEW, EVENT, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'u1' WITH GRANT OPTION;

DDM -> Oracle Synchronization

Table 9 Checking whether the destination database user has sufficient permissions

Check Item

Whether the destination database user has sufficient permissions

Description

Check whether the destination database user permissions meet the requirements for DDM to Oracle synchronization. If the permissions are insufficient, the synchronization will fail.

Failure Cause and Handling Suggestion

Failure cause: The destination database user does not have sufficient permissions.

Handling suggestion: Use an account with the DBA permission, or grant required permissions to the user.