Step 1: Buy a DB Instance
This section describes how to buy a DB instance on the management console.
Currently, RDS for MySQL supports the yearly/monthly and pay-per-use billing modes. The DB instance class and storage space you need depend on your processing power and memory requirements.
You can create multiple read replicas when you are buying single or primary/standby DB instances.
- You have registered a HUAWEI CLOUD account.
- Log in to the management console.
- Click in the upper left corner and select a region and a project.
- Click in the upper left corner of the page and choose Database > Relational Database Service. The RDS console is displayed.
- On the Instance Management page, click Buy DB Instance.
- On the displayed page, select a billing mode and configure information about your DB instance. Then, click Next.
RDS provides the following billing modes:
Pay-per-useIf you select this billing mode, go to 6.
Table 1 Basic information
The region where your RDS resources will be located. You can change it on the creation page, or go back to the Instance Management page and change it in the upper left corner.NOTE:
Products in different regions cannot communicate with each other through a private network. After a DB instance is purchased, the region cannot be changed. Therefore, exercise caution when selecting a region.
DB Instance Name
Must start with a letter and consist of 4 to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.
- If you intend to create multiple DB instances and read replicas, the length of each DB name will change.
- If you create multiple DB instances at a time, they will be named with four digits appended to the DB instance name. For example, if you enter instance, the first instance will be named instance-0001, the second instance-0002, and so on.
Set to MySQL.
DB Engine Version
For details, see DB Engines and Versions.
Different DB engine versions are supported in different regions.
You are advised to select the latest available version because it is more stable, reliable, and secure.
DB Instance Type
- Primary/Standby: uses an HA architecture with a primary DB instance and a synchronous standby DB instance. It is suitable for production databases of large- and medium-sized enterprises in Internet, Internet of Things (IoT), retail e-commerce sales, logistics, gaming, and other sectors. The standby DB instance improves instance reliability and is invisible to you after being created.
An AZ is a physical region where resources use independent power supply and networks. AZs are physically isolated but interconnected through an internal network. Some regions support both single AZs and multiple AZs and some only support single AZs.
To achieve higher reliability, RDS will automatically deploy your primary/standby instances in different physical servers even if you deploy primary/standby DB instances in the same AZ. If you attempt to create primary/standby DB instances in the same AZ in a Dedicated Computing Cluster (DCC) and there is only one physical server available, the creation will fail.
You can deploy primary and standby DB instances in a single AZ or across AZs to achieve failover and high availability.
- Single: uses a single-node architecture, which is more cost-effective than primary/standby DB instances. It is suitable for development and testing of microsites, and small- and medium-sized enterprises, or for learning about RDS.
Determines the DB instance read/write speed. The higher the maximum throughput is, the higher the DB instance read/write speed can be.
- Cloud SSD: stores data in cloud SSDs to achieve decoupled compute and storage.
- Extreme SSD: uses the 25GE network and RDMA technology to provide you with up to 1 million random read/write performance per disk and low latency per channel.
- Ultra-high I/O: supports a maximum throughput of 350 MB/s.
- If you have purchased the Dedicated Distributed Storage Service (DSS), only the storage type that you have selected when you buy the DSS service is displayed.
- The cloud SSD storage type is supported only with general-purpose and dedicated DB instances.
- The extreme SSD storage type is supported only with dedicated DB instances.
- The ultra-high I/O storage type is supported only with general-enhanced and general-enhanced II DB instances.
- After the DB instance is created, the storage type cannot be modified.
- Disk encryption is supported only for ultra-high I/O and cloud SSD disks.
- To use local disks and extreme SSDs, contact customer service to apply for the required permissions.
Select a time zone when you are creating a DB instance, and you can change it after the DB instance is created.
Table 2 Instance specifications
Refers to the CPU and memory of a DB instance. Different instance classes have different numbers of database connections and different maximum IOPS.
For details about instance classes, see MySQL Instance Classes.
After a DB instance is created, you can change its CPU and memory. For details, see Changing a DB Instance Class.NOTE:
DB instances in a DCC only support the general-enhanced instance class.
This option is displayed only when you buy the Dedicated Distributed Storage Service (DSS) service.
Displayed only when you select DSS for Resource Type. The storage pool is secure because it is physically isolated from other pools.
Storage Space (GB)
Contains the file system overhead required for inode, reserved block, and database operation.If the storage type is cloud SSD, ultra-high I/O, or extreme SSD, you can enable storage autoscaling. If the available storage drops to a specified threshold, autoscaling is triggered.
- Storage autoscaling: If you select this option, autoscaling is enabled.
- Available storage: If the available storage drops to a specified threshold or 10 GB, autoscaling is triggered.
- Maximum storage threshold for autoscaling: The default value range is from 40 GB to 4,000 GB. The threshold must be no less than the storage of the DB instance.
After a DB instance is created, you can scale up its storage space. For details, see Scaling up Storage Space.NOTE:
- Storage space can range in size from 40 GB to 4,000 GB and can be scaled up only by a multiple of 10 GB.
- If you specify a read replica when creating a primary DB instance and enable storage autoscaling for the primary DB instance, storage autoscaling is also enabled for the read replica by default.
- Disable: indicates the encryption function is disabled.
- Enable: indicates the encryption function is enabled, improving data security but affecting system performance.
Key Name: indicates the tenant key. You can create or select a key.NOTE:
- Once the DB instance is created, you cannot modify the disk encryption status or change the key. The backup data stored in OBS is not encrypted.
- After an RDS DB instance is created, do not disable or delete the key that is being used. Otherwise, RDS will be unavailable and data cannot be restored.
- For details about how to create a key, see the "Creating a CMK" section in the Data Encryption Workshop User Guide.
Table 3 Network
A dedicated virtual network in which your RDS DB instances are located. A VPC can isolate networks for different services. You can select an existing VPC or create a VPC. For details on how to create a VPC, see the "Creating a VPC" section in the Virtual Private Cloud User Guide.
If no VPC is available, RDS allocates a VPC to you by default.NOTICE:
After the DB instance is created, the VPC cannot be changed.
Improves network security by providing dedicated network resources that are logically isolated from other networks. Subnets take effect only within an AZ. The Dynamic Host Configuration Protocol (DHCP) function is enabled by default for subnets in which you plan to create RDS DB instances and cannot be disabled.
A floating IP address is automatically assigned when you create a DB instance. You can also enter an unused IPv4 floating IP address in the subnet CIDR block. After the DB instance is created, you can change the floating IP address.
Enhances security by controlling access to RDS from other services. You need to add inbound rules to a security group so that you can connect to your DB instance.
If no security group is available or has been created, RDS allocates a security group to you by default.
Table 4 Database configuration
- Configure (default setting): Configure a password for your DB instance during the creation process.
- Skip: Configure a password later after the DB instance is created.NOTICE:
To log in, you will have to reset a password for the DB instance.
After a DB instance is created, you can reset the password. For details, see Resetting the Administrator Password.
The default login name for the database is root.
Must consist of 8 to 32 characters and contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters (~!@#$%^*-_=+?,()&). Enter a strong password and periodically change it for security reasons.
Keep this password secure. The system cannot retrieve it.
After a DB instance is created, you can reset this password. For details, see Resetting the Administrator Password.
Must be the same as Administrator Password.
Contains engine configuration values that can be applied to one or more DB instances. If you intend to create primary/standby DB instances, they use the same parameter template.NOTICE:
If you use a custom parameter template when creating a DB instance, the following specification-related parameters in the custom template are not delivered. Instead, the default values are used.
You can modify the instance parameters as required after the DB instance is created. For details, see section Modifying Parameters in a Parameter Template.
Table Name Case Sensitivity
Specifies whether table names are case sensitive. This parameter is supported for MySQL 8.0 only.
(Optional) Specifies the certificate created by Cloud Certificate Manager (CCM). The default certificate is the system certificate that is automatically generated. You can also select another certificate from the drop-down list.NOTICE:
If you want to specify a certificate when creating a DB instance, contact customer service to apply for the permission.
If the DB instance has been associated with an enterprise project, select the target project from the Enterprise Project drop-down list.
You can also go to the ProjectMan console to create a project. For details about how to create a project, see the ProjectMan User Guide.
Table 5 Tags
Tags an RDS DB instance. This configuration is optional. Adding tags to RDS DB instances helps you better identify and manage the DB instances. A maximum of 10 tags can be added for each DB instance.
After a DB instance is created, you can view its tag details on the Tags page. For details, see Managing Tags.
Table 6 Purchase period
This option is available only for yearly/monthly DB instances. The system will automatically calculate the configuration fee based on the selected required duration. The longer the required duration is, the larger discount you will enjoy.
If you want to set this parameter to 5 years, the restrictions are as follows:
- You need to contact customer service to apply for the required permissions.
- This setting is supported only in CN North-Beijing4, CN East-Shanghai1, CN South-Guangzhou, and CN Southwest-Guiyang1.
- This setting is supported only with general-purpose instances.
- This option is available only for yearly/monthly DB instances and is not selected by default.
- If you select this option, the auto-renew cycle is determined by the selected required duration.
RDS supports batch creation of DB instances. If you intend to create primary/standby DB instances and set Quantity to 1, a primary DB instance and a synchronous standby DB instance will be created.
Table 7 Read replicas
By default, read replicas are named with "read" and two digits appended to the primary DB instance name. For example, if the primary instance name is instance-0001, the first read replica will be named instance-0001-read-01.
The network and storage configurations are the same as those of the primary DB instance.
Read Replica AZ
By default, the primary DB instance and read replicas are deployed in different AZs. You can choose AZs as required.NOTICE:
Products in different regions cannot communicate with each other through a private network and you cannot change the region of a DB instance after creating the instance. Therefore, exercise caution when selecting a region.
Refers to the CPU and memory of a DB instance.
Read Replica Quantity
You can choose to create read replicas when you are creating a primary DB instance. After the primary DB instance is created, the system automatically triggers the creation of read replicas. You can create a maximum of five read replicas for each primary DB instance.
If you intend to create primary/standby DB instances and set Read Replica Quantity to 1, a primary/standby DB instance and a read replica will be created.
If you have any questions about the price, click Pricing details at the bottom of the page.
The performance of your DB instance depends on its configurations. Hardware configuration items include the instance specifications, storage type, and storage space.
- Confirm the specifications for pay-per-use DB instances.
- If you need to modify your settings, click Previous.
- If you do not need to modify your settings, click Submit.
- Confirm the order for yearly/monthly DB instances.
- If you need to modify your settings, click Previous.
- If you do not need to modify your settings, click Pay Now.
- Select a payment method and complete the payment.
This operation applies only to the yearly/monthly billing mode.
- To view and manage the DB instance, go to the Instance Management page.
- During the creation process, the DB instance status is Creating. When the creation process is complete, the instance status will change to Available. You can view the detailed progress and result of the task on the Task Center page.
- The automated backup policy is enabled by default. After the DB instance is created, you can modify the automated backup policy. An automated full backup is immediately triggered after a DB instance is created.
- After a DB instance is created, you can enter a description for it.
- The default database port is 3306. After a DB instance is created, you can change its port.
You are advised to change the database port in a timely manner.
For details, see Changing a Database Port.