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.
Account Type
Account Type |
Description |
---|---|
Administrator account root |
Only the administrator account root is provided on the instance creation page. For details about the supported permissions, see RDS for MariaDB Constraints.
NOTE:
Running revoke, drop user, or rename user on root may cause service interruption. Exercise caution when running any of these statements. |
System accounts |
To provide O&M services, the system automatically creates system accounts when you create RDS for MariaDB DB instances. These system accounts are unavailable to you.
|
Other accounts |
Accounts created through the console, APIs, or SQL statements After an account is created, you can assign permissions to it as required. For details, see Changing Permissions for a Database Account. |
Constraints
Database accounts cannot be created for DB instances that are in the process of being restored.
Creating a Database Account Through RDS
- Log in to the management console.
- Click in the upper left corner and select a region and a project.
- Click in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, click the target DB instance.
- On the Accounts page, click Create Account. In the displayed dialog box, specify Username and Host IP Address, 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.
- 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 Creating a Database. You can also modify the permissions after the account creation by referring to 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 (~!@#$%^*-_=+?,()&).
- You can specify IP addresses that are allowed to access your DB instance.
- To enable all IP addresses to access your instance, enter % for Host IP Address.
- To enable all IP addresses in the subnet 10.10.10.X to access your instance, enter 10.10.10.% for Host IP Address.
- To specify multiple IP addresses, separate them with commas (,), for example, 192.168.0.1,172.16.213.9 (no spaces before or after the comma).
- After the account is created, you can manage it on the Accounts page of the DB instance.
Creating a Database Account Through DAS
- Log in to the management console.
- Click in the upper left corner and select a region and a project.
- Click in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, locate the instance you want to log in and click Log In in the Operation column.
- On the displayed login page, enter the username and password and click Log In.
- 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 choose SQL Operations > SQL Query from the top menu bar and run the following command to create an account:
create user username;
- 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.
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