Checking Whether the Destination Database User Has Sufficient Permissions
MySQL Migration
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. If the destination database version is in the range from 8.0.14 to 8.0.18, the SESSION_VARIABLES_ADMIN permission is required. 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. |
PostgreSQL Synchronization
Check Item |
Whether the destination database user has sufficient permissions |
---|---|
Description |
Different permissions are granted based on the scope of objects to be synchronized.
|
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 username with createdb; |
Failure cause: The user does not have the USAGE permission for schemas. Handling suggestion: Grant the destination database user the CREATEDB permission. grant usage on schema schemaname to username; |
|
Failure cause: The user does not have the permission to create tales. Handling suggestion: Grant the destination database user the permission to create tables. grant create on schema schemaname to username; |
|
Failure cause: The user does not have the permission to create schemas. Handling suggestion: Grant the destination database user the permission to create schemas. grant create on database to username; |
MongoDB Migration
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: The destination database user must have the dbAdminAnyDatabase permission for the admin database, the read permission for the config database, and the readWrite permission for the destination database. Handling suggestion: Run the following statement to grant permissions to the destination database user. db.grantRolesToUser("Username",[{role:"dbAdminAnyDatabase",db:"admin"}, {role:"read",db:"config"}, {role:"readWriteAnyDatabase",db:"admin"}]) |
|
Failure cause: The destination database user must have the readWrite permission for the databases to be migrated. Handling suggestion: Run the following statement to grant permissions to the destination database user. db.grantRolesToUser("Username",[{role:"readWriteAnyDatabase",db:"admin"}]) |
|
Failure cause: The destination database user must have the read permission for the config database. Handling suggestion: Run the following statement to grant permissions to the destination database user. db.grantRolesToUser("Username",[{role:"read",db:"config"}]) |
|
Failure cause: The destination database user must have the dbAdminAnyDatabase permission for the admin database. Handling suggestion: Run the following statement to grant permissions to the destination database user. db.grantRolesToUser("Username",[{role:"dbAdminAnyDatabase",db:"admin"}]) |
|
Failure cause: The destination database user must have the clusterManager permission for the admin database. Handling suggestion: Run the following statement to grant permissions to the destination database user. db.grantRolesToUser("Username",[{role:"clusterManager",db:"admin"}]) |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot