Create at least one account and one database on your ApsaraDB RDS for MariaDB instance before applications can connect.
Account types
ApsaraDB RDS for MariaDB supports two account types, both managed through the console.
| Property | Privileged account | Standard account |
|---|---|---|
| Limit per instance | One | Multiple (varies by minor engine version) |
| Management methods | Console or API | Console, API, or SQL statements |
| Database permissions | All databases | Only authorized databases |
| Manage standard accounts | Yes | No |
| Disconnect any account | Yes | No |
| Fine-grained per-table permissions | Yes | No |
If a privileged account username matches an existing standard account, the privileged account replaces that standard account.
Prerequisites
Ensure the following:
-
Your ApsaraDB RDS for MariaDB instance is in the Running state.
-
Your Alibaba Cloud account has permissions to manage the RDS instance.
Create a privileged account
-
Go to the Instances page. In the top navigation bar, select the region of your RDS instance. Find the instance and click its ID.
-
In the left-side navigation pane, click Accounts.
-
Click Create Account.
-
Configure the following parameters.
Parameter Description Database Account Enter a username. Must start with a letter, end with a letter or digit, and contain only lowercase letters, digits, or underscores (_). Length: 2–16 characters. Account Type Select Privileged Account. New Password Enter a password. 8–32 characters. Must include at least three of: uppercase letters, lowercase letters, digits, and special characters (! @ # $ % ^ & * ( ) _ + - =). Confirm Password Re-enter the password for confirmation. Description Optional. A description for the account. Maximum: 256 characters. -
Click OK.
If the privileged account username matches an existing standard account, the privileged account replaces the standard account.
Result
The new privileged account appears on the Accounts page with full permissions on all databases.
Create a standard account
-
Go to the Instances page. In the top navigation bar, select the region of your RDS instance. Find the instance and click its ID.
-
In the left-side navigation pane, click Accounts.
-
Click Create Account.
-
Configure the following parameters.
Parameter Description Database Account Enter a username. Must start with a letter, end with a letter or digit, and contain only lowercase letters, digits, or underscores (_). Length: 2–16 characters. Account Type Select Standard Account. Authorize Database: Optional. Grant the account permissions on one or more databases. Select databases from the left panel and click the arrow to move them to the right panel. Set a permission level for each: Read/Write (DDL + DML), Read-Only, DDL Only, or DML Only. To apply the same permission to all databases, click Set All To Read/Write (DDL+DML). Leave blank to grant permissions later. New Password Enter a password. 8–32 characters. Must include at least three of: uppercase letters, lowercase letters, digits, and special characters (! @ # $ % ^ & * ( ) _ + - =). Confirm Password Re-enter the password. Description Optional. A description for the account. Maximum: 256 characters. -
Click OK.
Result
The new standard account appears on the Accounts page. Permissions apply only to databases that you explicitly authorized.
Create a database
-
Go to the Instances page. In the top navigation bar, select the region of your RDS instance. Find the instance and click its ID.
-
In the left-side navigation pane, click Databases.
-
Click Create Database.
-
Configure the following parameters.
Parameter Description Database Name Enter a database name. Must start with a letter, end with a letter or digit, and contain only lowercase letters, digits, underscores (_), or hyphens (-). Length: 2–64 characters. Supported Character Set Select a character set for the database. Authorized By Optional. Select a standard account to grant permissions on this database. The privileged account is not listed because it already has full permissions on all databases. Leave blank to grant permissions later through Modify or reset account permissions. Description Optional. A description for the database. Maximum: 256 characters. -
Click Create.
Result
The new database appears on the Databases page. If you selected an account in Authorized By, that account is granted the specified permissions on this database.
Reset privileged account permissions
If the privileged account loses permissions unexpectedly, reset them as follows.
-
Go to the Instances page. In the top navigation bar, select the region of your RDS instance. Find the instance and click its ID.
-
In the left-side navigation pane, click Accounts.
-
Find the Privileged Account and click Reset Account Permissions in its row.
-
Enter and confirm a new password for the privileged account, and then click OK.
Result
The privileged account regains full permissions on all databases and standard accounts.
Related API operations
| API | Description |
|---|---|
| CreateAccount | Create an account on an RDS instance |
| CreateDatabase | Create a database on an RDS instance |