Relational Database ServiceRelational Database Service

Compute
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Anti-DDoS
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Compass
Cloud Certificate Manager
Anti-DDoS Service
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB NoSQL
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
ServiceStage
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain Service
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
DevCloud
ProjectMan
CodeHub
CloudRelease
CloudPipeline
CloudBuild
CloudDeploy
Cloud Communications
Message & SMS
Cloud Ecosystem
Marketplace
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
enterprise-collaboration
Meeting
IoT
IoT
Intelligent EdgeFabric
DeveloperTools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Updated at: Apr 02, 2022 GMT+08:00

Creating a Database Account

Scenarios

When you create a DB instance, account root is created at the same time by default. You can create other database accounts as needed.

You can create a database account using RDS or DAS:
  • RDS: RDS is easy to use. There are no special commands to remember.
  • DAS: DAS is a powerful platform that offers more flexibility, but you need to be familiar with the creation commands. The process requires a bit more expertise.

Constraints

Database accounts cannot be created for DB instances that are in the process of being restored.

Creating a Database Account Through RDS

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Database > Relational Database Service. The RDS console is displayed.
  4. On the Instance Management page, click the target DB instance.
  5. On the Accounts page, click Create Account. In the displayed dialog box, enter a username, authorize permissions for databases, enter a password, and confirm the password. Then, click OK.

    Figure 1 Creating a database account
    • The username consists of 1 to 32 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.
      • If the database version is RDS for MySQL 5.6, the username consists of 1 to 16 characters.
      • If the database version is RDS for MySQL 5.7 or 8.0, the username consists of 1 to 32 characters.
    • Select unauthorized databases and click to authorize them or select authorized databases and click to revoke permissions.

      If there are no unauthorized databases, you can create one by referring to section Creating a Database. You can also modify the permissions after the database creation by referring to section Changing Permissions for a Database Account.

    • The password must consist of 8 to 32 characters and contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters (~!@#$%^*-_=+?,()&).
    • If you require fine-grained permissions control, log in to the database through the DAS console.

  6. After the account is created, you can manage it on the Accounts page of the selected DB instance.

Creating a Database Account Through DAS

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Database > Relational Database Service. The RDS console is displayed.
  4. On the Instance Management page, locate the target DB instance and choose More > Log In in the Operation column.
  5. On the displayed page, enter the correct username and password and click Log In.
  6. Create an account.

    • On the top menu bar, choose Account Management > User Management. On the displayed page, click Create User. Then, configure basic information, advanced settings, global permissions, and object permissions, and click Save. In the displayed dialog box, click OK.

      For details about how to set permissions, see Creating a User.

    • You can also run the following command on the SQL Window tab to create an account:
      create user account name;

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel