doc-exports/docs/gaussdb_mysql/umn/gaussdbformysql_03_0131.html
Ru, Li Yi f3715d9cc9 gaussdbmysql
Reviewed-by: Wagner, Fabian <fabian.wagner@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-09-06 12:45:25 +00:00

9.3 KiB

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 create other database accounts as needed.

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 Service List. Under Databases, click GaussDB(for MySQL).
  4. On the Instances page, click the target DB instance.
  5. In the navigation pane, 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.

    Table 1 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, enter % for Host IP Address.
    • To enable all IP addresses in the subnet 10.10.10.* to access your DB instance, enter 10.10.10.% for Host IP Address.
    • 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 one by referring to Creating a Database. You can also modify the permissions by referring to Granting Database Permissions.
    NOTE:

    If you do not delete a database on the GaussDB(for MySQL) 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.

    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 the following special characters: ~!@#$%^*-_=+?,()&|.
    • Comply with the values of validate_password parameters.

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

    • Cannot be 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 return characters and the following special characters: !<"='>&

  6. After the account is created, you can manage it on the Accounts page.