For MySQL 5.5/5.6

Last Updated: Jul 25, 2017

Note: This article is only applicable to MySQL 5.5 and 5.6. For the information on how to create a database and an account for MySQL 5.7, see Create a database and an account for MySQL 5.7.

Before using RDS, you need to create databases and accounts in the RDS instance. For MySQL 5.5 and 5.6, you can create and manage the databases and accounts directly through the RDS console, and this article mainly introduces the detailed procedure.

Attentions

  • Databases under a single instance share all the resources of this instance. Each MySQL 5.5 or 5.6 instance supports up to 500 databases and 500 accounts.

  • To migrate the local database to RDS, you need to create the same database and account as those of the local database.

  • When assigning account permissions for each database, follow the minimum permission principle and service roles to create accounts and rationally assign Read-only and Read/Write permissions. When necessary, you can split accounts and databases into smaller units so that each account can only access data for its own services. If the account does not need to write data to a database, assign Read-only permission.

  • For database security, set strong passwords for the accounts and change the passwords regularly.

Operation procedure

  1. Log on to the RDS Console.

  2. Select the region where the target instance is located.

  3. Click the ID of the instance to visit the Basic Information page.

  4. Select Account Management in the left navigation bar to visit the Account Management page.

  5. Click Create Account, as shown in the following figure.

    Create account button

  6. Enter the information of the account to create, as shown in the following figure.

    Set account information

    Parameters description:

    • Database Account: refers to tha account name. It can have 2 to 16 characters including lower-case letters, digits, or underscores. It must begin with a letter and end with a letter or a digit.

    • Authorized Database: refers to the database that this account is authorized to access. If there is no database, you do not need set this field. You can authorize an acccount to multiple databases and the steps are as follows.

      1. In Unauthorized Database box, select the target database.

      2. Click Authorize to add the selected database to the Authorized Database box.

      3. You can authorize the Read-only or Read/Write permission to the account for each authorized database. If you want to authorize the same permissions to the account for all the authorized databases, click Set All Read/Write or Set All Read-only, shown as the following figure.

        Authorize the account

    • Password: refers to the password corresponding to this account. It can have 8 to 32 characters including at least three of the following:

      • Capital letters

      • Lower-case letters

      • Digits

      • Special characters ( !@#$%^&*()_-+=)

    • Re-enter Password: enter the password again to ensure that a correct password is entered.

    • Note: you can add the additional information relevant to this account for the convinience of follow-up account management. A maximum of 256 characters can be entered.

  7. Click OK, and creating account is completed.

  8. Select Database Management in the left navigation bar to visit the Database Management page.

  9. Click Create Database, as shown in the following figure.

    Create database button

  10. Enter the information of the database, as shown in the following figure.

    Set database information

    Parameters description:

    • Database (DB) Name: can have 2 to 64 characters including the lowercase letters, digits, underscores, or hyphens. It must begin with a letter and end with a letter or a digit.

    • Supported Character Set: refers to the supported character set of the database. You can select utf8, gbk, latin1, or utf8mb4.

    • Authorized Account: you can select an account authorized to access this database. If no account has been created, you do not need to set this field.

    • Account Type: this option is visible after Authorized Account is set. You can authorize Read/Write or Read only permission to the authorized account.

    • Remarks: you can add the additional information relevant to this database for the convinience of follow-up database management. A maximum of 256 characters can be entered.

Thank you! We've received your feedback.