Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Checking Whether the Destination Database User Has Sufficient Permissions

Updated on 2023-01-05 GMT+08:00

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. 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

Table 2 Checking whether the destination database user has sufficient permissions

Check Item

Whether the destination database user has sufficient permissions

Description

Different permissions are granted based on the scope of objects to be synchronized.

  • Database-level synchronization objects:

    The CREATEDB permission and the root user or a member of root are required (only in special scenarios). For details, see the following description.

  • Table-level synchronization object:

    To synchronize databases: The CREATEDB permission is required.

    To synchronize schemas, the CONNECT and CREATE permissions for the database that contains the schema are required.

    To synchronize objects in a schema: The CONNECT permission for the database that contains the schema, the USAGE permission for the schema that contains the object, and CREATE permission for the schema that contains the object are required.

  • Synchronization user: The CREATEROLE permission is required.
  • Permission to synchronize objects: The default privilege is the default value and cannot be modified. Otherwise, the object permissions of the destination database may be different from those of the source database.

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

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: 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"}])

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback