DRDS databases are built on ApsaraDB RDS for MySQL instances. For the stability of the Online Transaction Processing (OLTP) service, we recommend that you use new ApsaraDB RDS for MySQL instances for creating DRDS databases.

Limits

Currently, you can create DRDS databases only in the console. DRDS does not support creating databases with SQL statements.

Procedure

  1. Log on to the DRDS console.
  2. In the top navigation bar, select the region where the target instance is located.
  3. Find the target instance and click the instance ID to go to the Basic Information page.
  4. In the upper-right corner of the Basic Information page, click Create Database.
  5. In the dialog box that appears, set Split Mode as needed and set parameters.
    • If you select Horizontal Split, perform the following steps:
      1. In the Enter Basic Information step, set the following parameters and click Next.
        Parameter Description
        Split Mode Select Horizontal Split.
        Note DRDS can split data to multiple database shards and table shards based on the sharding rules. In horizontal partitioning mode, you can scale out the database horizontally to linearly increase the overall storage capacity and concurrent throughput of the database.
        Storage Type Select PolarDB for MySQL or RDS for MySQL as the storage type. This topic takes RDS for MySQL as an example.
        Database Name Enter the name of the database.
        Note The database name must meet the following requirements:
        • It consists of lowercase letters, numbers, and underscores (_).
        • It must start with a letter and must be 1 to 24 characters in length.
        Character Set Set Character Set to uft8, gbk, latin1, or uft8mb4.
        Link password Enter the database link password.
        Note The link password must meet the following requirements:
        • It must be 8 to 30 characters in length.
        • It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and underscores (_).
        Confirm Password Enter the database link password again for confirmation.
      2. In the Select RDS step, select the target ApsaraDB RDS for MySQL instances, click the 1 icon to move them from the left side to the right side, and click Next.
    • If you select Vertical Split, set the following parameters, and then click Next.
    Parameter Description
    Split Mode Select Vertical Split.
    Note You can import data from multiple databases on different Apsara PolarDB for MySQL clusters or ApsaraDB RDS for MySQL instances in batch. You can use the DRDS instance-level account for centralized authorization management. You can complete joint queries and write operations of transactions across multiple ApsaraDB RDS for MySQL instances by using one DRDS endpoint.
    Storage Type Select PolarDB for MySQL (recommended) or RDS for MySQL as the storage type. This topic takes RDS for MySQL as an example.
    Add Database
    1. Select the target instance from the available ApsaraDB RDS for MySQL instances.
    2. Select the target database from the existing ones on the target instance, and click the 1 icon to move it to the right side.
    Character Set Set Character Set to uft8, gbk, latin1, or uft8mb4.
    Account Type Select Create a new account or Select an existing account.
    Database Account Enter a name for the account.
    Note This parameter is supported only when you select Create a new account as the account type.
    Link password Enter the database link password.
    Note The link password must meet the following requirements:
    • It must be 8 to 30 characters in length.
    • It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and underscores (_).
    Confirm Password Enter the database link password again for confirmation. This parameter is supported only when you select Horizontal Partitioning or when you create an account for the vertical partitioning mode.
  6. In the Precheck step, wait until the precheck result is displayed as Success, and click Next.
  7. In the Preview step, confirm the database information, and click Next to complete the database creation.