Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Creating a Schema

Updated on 2024-07-30 GMT+08:00

This section describes how to create a schema on the DDM console.

Precautions

  • When you create a schema, select only data nodes that are in the same VPC as the DDM instance and are not used by other DDM instances. DDM will create databases on the selected data nodes without affecting their existing databases and tables.
  • All instances associated with one schema must be of the same major MySQL version.
  • Specifications of associated data nodes should be greater than that of the DDM instance. Otherwise the performance will be affected.
  • Multiple schemas can be created in a DDM instance and associated with the same data node.
  • One data node cannot be associated with schemas in different DDM instances.
  • If you create a sharded schema, more than one shard will be generated in the schema. Shard names will follow the rule: <schemaname>_<number>. <number> here indicates a four-digit number starting from 0000. This number will be incremented by one. For example, if a schema name is db_cbb5 and there are 2 shards, the shard names are db_cbb5_0000 and db_cbb5_0001.
  • Read-only instances cannot be associated with the schema as data nodes.
  • Do not modify or delete the internal accounts (DDMRW*, DDMR*, and DDMREP*) created on data nodes. Otherwise, services will be affected.
    NOTE:
    • The internal account name is in the format: Fixed prefix (such as DDMRW, DDMR, or DDMREP) + Hash value of the data node ID.
    • A random password is generated, which can contain 16 to 32 characters.

Prerequisites

Procedure

  1. Log in to the DDM console.
  2. On the Instances page, locate the required DDM instance and click Create Schema in the Operation column.

    Figure 1 Creating a schema — Instances page

    Alternatively, click the instance name to go to the Basic Information page. On the displayed page, choose Schemas in the navigation pane and click Create Schema in the upper left corner of the page.

    Figure 2 Creating a schema — Schemas page

  3. On the displayed page, configure required parameters.

    Figure 3 Creating a schema
    Table 1 Parameter description

    Parameter

    Description

    Sharding

    • 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 the data node.

    Schema

    The name can contain 2 to 48 characters and must start with a lowercase letter. Only lowercase letters, digits, and underscores (_) are allowed.

    Account

    The DDM account that needs to be associated with the schema.

    Data Nodes

    Select only data nodes that are in the same VPC as the DDM instance and are not used by other DDM instances. Databases can be created on the data nodes you select, without impacting existing databases and tables.

    Shards

    The total shards are the shards on all data nodes. There cannot be more data nodes than there are shards in the schema. Each data node must have at least one shard assigned. Recommended shards per data node can be 8 to 64.

  4. Click Next.
  5. On the displayed page, enter a database account with the required permissions and click Test Availability.

    NOTE:

    Required permissions: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, and TRIGGER WITH GRANT OPTION

    You can create a database account for the RDS for MySQL instance and assign it the above permissions in advance.

    Figure 4 Testing availability of data nodes

  6. After the test becomes successful, click Finish.

    After the schema is created, the schema status is as follows:

    • Creating
    • Creation failed
    • Running

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback