This topic describes how to create databases and accounts for an ApsaraDB RDS for MySQL instance.
Create a database
- Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane, click Databases.
On the page that appears, click Create Database.
Configure the following parameters.
Parameter
Description
Database Name
The name of the database. The name must be 2 to 64 characters in length.
The name must start with a lowercase letter and end with a lowercase letter or a digit.
The name can contain lowercase letters, digits, underscores (_), and hyphens (-).
The name must be unique within the RDS instance.
NoteIf the database name contains a hyphen
(-)
, the system parses the hyphen(-)
as@002d
in the name of the folder in which the database resides.Supported Character Set
The character set of the database.
Description
The description of the database. The description must be 2 to 256 characters in length.
Click Create.
Create an account
- Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane, choose Accounts.
On the page that appears, click Create Account.
NoteIf the username of the account is duplicate or an account creation task is in progress, an error message may be displayed. If the error message is displayed, check whether the username of the account is duplicate or an account creation task is in progress.
Configure the Database Account parameter.
The name of an account must start with a lowercase letter and end with a lowercase letter or a digit.
The name can contain lowercase letters, digits, and underscores (_).
The name must be 2 to 32 characters in length.
Configure the Account Type parameter.
Standard Account: Select databases from the Unauthorized Databases section, click the
icon to add the selected databases to the Authorized Databases section, and then grant the Read/Write (DDL + DML), Read-only, DDL Only, or DML Only permissions to the account.
Privileged Account: The privileged account has permissions on all databases that are created on the RDS instance. You do not need to grant permissions on specific databases to the privileged account.
NoteFor more information about the differences between privileged accounts and standard accounts, see Account types.
If the Privileged Account option is dimmed, a privileged account has been created on the RDS instance.
Enter the password:
The password of the account. The password must be 8 to 32 characters in length.
The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The password can contain the following special characters: ! @ # $ % ^ & * ( ) _ + - =
Click OK.
FAQ
Can I manage accounts at fine-grained levels, such as the source IP address level and the table level?
For more information, see Authorize an account to access its authorized databases from specified IP addresses or Authorize accounts to manage tables, views, and fields.
Does ApsaraDB RDS provide accounts that are equivalent to root or superuser accounts?
No, ApsaraDB RDS does not provide accounts that are equivalent to root or superuser accounts. This way, your RDS instance can be protected from data loss and leaks that are caused by accidental operations.
Related operations
Operation | Description |
Creates or manages accounts. | |
Creates a database on an instance. | |
Resets the password of an account. | |
Deletes an account from an instance. | |
Deletes a database from an instance. | |
Modifies the description of a database. |
References
For more information about how to create databases and accounts for an RDS instance that runs a different database engine, see the following topics: