Updated on 2025-02-26 GMT+08:00

Creating an Account

Scenarios

When you create a TaurusDB instance, account root is created by default. You can create other accounts as needed.

You can create an account through TaurusDB or DAS:
  • TaurusDB: TaurusDB 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.

Account Types

Table 1 Account description

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 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 TaurusDB instances. These system accounts are unavailable to you.

  • rdsAdmin: a management account with superuser permissions, which is used to query and modify instance information, rectify faults, migrate data, and restore data.
  • rdsRepl: a replication account, which is used to synchronize data from the primary node to read replicas.
  • rdsBackup: a backup account, which is used to back up data in the background.
  • rdsMetric: a metric monitoring account, which is used by watchdog to collect database status data.
  • rdsProxy: a database proxy account, which is used for authentication when the database is connected through the proxy address. This account is automatically created when you enable read/write splitting.

Other accounts

Accounts created through the console or SQL statements.

After an account is created, you can assign permissions to it as required. For details, see Changing Permissions for Accounts.

Constraints

This operation is not allowed when another operation is being performed on your DB instance.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > TaurusDB.
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose Accounts.
  6. On the displayed page, click Create Account.
  7. In the displayed dialog box, set the required parameters.

    Figure 1 Creating an account

    Table 2 Parameter description

    Parameter

    Description

    Username

    The username can consist of 1 to 32 characters. Only letters, digits, and underscores (_) are allowed.

    Host IP Address

    • To enable all IP addresses to access your DB instance, set it to %.
    • To enable all IP addresses in the subnet 10.10.10.* to access your DB instance, set it to 10.10.10.%.
    • To specify multiple IP addresses, separate them with commas (,), for example, 192.168.0.*,172.16.213.* (no spaces before or after the comma).

    Database

    You can select one or more unauthorized databases and authorize their permissions to the account. If there are no unauthorized databases, you can create ones. You can also modify the database permissions after the account is created.
    NOTE:
    • If you do not delete a database on the TaurusDB console but delete a database in other ways, permissions granted specifically for the database are not automatically deleted. They must be deleted manually. This is an open-source MySQL behavior. For details, see DROP DATABASE Statement.
    • If you require fine-grained permissions control, log in to the DAS console.

    Password

    The password must:

    • Consist of 8 to 32 characters.
    • Contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters (~!@#$%^*-_=+?,()&|.).
    • Comply with the values of validate_password parameters.

      To check the password-related parameter values, click an instance name, choose Parameters in the navigation pane, and search for validate_password in the upper right corner of the page.

    • Be different from the username or the username spelled backwards.

    Confirm Password

    The value must be the same as that of Password.

    Remarks

    The remarks can consist of up to 512 characters. It cannot contain carriage returns or any of the following special characters: !<"='>&

  8. Click OK.
  9. After the account is created, manage it on the Accounts page.
  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > TaurusDB.
  4. On the Instances page, locate an instance and click Log In in the Operation column.
  5. On the displayed DAS login page, enter the username and password and click Log In.
  6. Create an account using either of the following methods:

    • Choose SQL Operations > SQL Query. In the displayed SQL window, select the target database and run the following command:
      create user username;
    • Choose Account Management > User Management and click Create User.

      For detailed operations and parameter settings, see Creating a User.