Help Center/ Distributed Database Middleware/ Getting Started/ Step 2: Create a Schema and Associate It with an RDS for MySQL Instance
Updated on 2022-09-15 GMT+08:00

Step 2: Create a Schema and Associate It with an RDS for MySQL Instance

You can create a schema on the Instances or Schemas page. This section uses the Instances page as an example to describe how to create a schema.

Figure 1 Instances page
Figure 2 Schemas page

Procedure

  1. Log in to the DDM console, and in the navigation pane, choose Instances. In the instance list, locate the required DDM instance and click Create Schema in the Operation column.
  2. On the displayed page, specify a sharding mode, enter a schema name, set the number of shards, select the required DDM accounts, and click Next.

    Figure 3 Creating a schema
    • DDM supports two sharding options:
      • Sharded: indicates that one schema can be associated with multiple data nodes, and all shards will be evenly distributed across the nodes.
      • Unsharded: indicates that one schema can be associated with only one data node, and only one shard can be created on that instance.
    • Schema Name: indicates the name of the schema. The name contains 2 to 48 characters and must start with a lowercase letter. Only lowercase letters, digits, and underscores (_) are allowed.
    • Shards: indicates the total number of shards that can be created in the schema. The number of shards on a data node cannot exceed 64. If more than 64 shards are required, contact DDM technical support.

  3. Enter the database password and click Test Connection.

    Figure 4 Testing the connection

  4. After the test becomes successful, click Finish.