Updated on 2023-10-18 GMT+08:00

Creating a Database Account

Scenarios

When you create a GaussDB(for MySQL) instance, account root is created at the same time by default. You can add other accounts as required.

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 a project.
  3. Click in the upper left corner of the page, choose Database > GaussDB(for MySQL).
  4. On the Instances page, click the instance name to go to the Basic Information page.
  5. In the navigation pane on the left, choose Accounts. On the displayed 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.

    • The username consists of 1 to 32 characters. Only lowercase letters, digits, and underscores (_) are allowed.
    • 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.
    • The remarks can consist of up to 512 characters. It cannot contain carriage return characters and the special characters (!<"='>&). To use remarks, ensure that your kernel version must be 2.0.13.0 or later. To upgrade kernel version, see Upgrading a Minor Version.
    • The password consists of 8 to 32 characters, including at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters (~!@#$%^*-_=+?,()&). It cannot be the same as the username or the username spelled backwards.

  6. After the account is created, you can manage it on the Accounts page of the selected 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, choose Database > GaussDB(for MySQL).
  4. On the displayed login page, enter the username and password and click Log In.
  5. Choose SQL Operations > SQL Window and enter the following command:

    create user Account name;