Buying and Connecting to a Multi-primary Instance
Scenarios
This section describes how to buy a multi-primary instance on the TaurusDB console and connect to it through a proxy instance.
Billing
Multi-primary instances only support pay-per-use billing. After buying a multi-primary instance, you will be billed for resources you actually use. For billing details, see Pay-per-Use Billing.
Constraints
- To use multi-primary instances, submit a service ticket.
- Multi-primary instances only support pay-per-use billing.
- Multi-primary instances are only available when the kernel version is 2.0.57.240900 or later. For details about how to check the kernel version, see How Can I Check the Version of a TaurusDB Instance?
Prerequisites
- You can create an IAM user or user group on the IAM console and grant it specific operation permissions, to perform refined management on Huawei Cloud. For details, see Creating a User and Granting TaurusDB Permissions.
- Your account balance is not below zero.
Step 1: Buy a Multi-primary Instance
- Go to the Buy DB Instance page.
- On the displayed Custom Config page, select Pay-per-use for Billing Mode, configure required information, and click Next.
- Basic configuration
Figure 1 Basic configuration
Table 1 Basic configuration Parameter
Description
Billing Mode
Select Pay-per-use.
Region
Region where an instance is deployed.
You cannot change the region of an instance once it is purchased.
- Resource selection
Figure 2 Resource selection
Table 2 Resource selection Parameter
Description
DB Engine Version
Select TaurusDB V2.0.
Kernel Version
DB kernel version. For details about the updates in each kernel version, see TaurusDB Kernel Version Release History.
Specifying the kernel version when buying an instance is in the OBT phase. To use this function, submit a service ticket.
Creation Method
Select Create new.
DB Instance Type
Select Multi-primary.
A multi-primary instance can contain 2 to 63 primary nodes, with no read replicas. Such an instance can process multiple reads and writes, delivering excellent read/write performance at high concurrency.
AZ Type
An AZ is a physical region where resources have their own independent power supply and networks. AZs are physically isolated but interconnected through an internal network. Some regions support both single-AZ and multi-AZ deployment and some only support single-AZ deployment.
- Single-AZ: The primary node and read replicas are deployed in the same AZ.
- Multi-AZ: The primary node and read replicas are deployed in different AZs to achieve higher availability and reliability. It is suitable for workloads that require cross-AZ DR or are insensitive to cross-AZ latency.
Storage Type
- DL6
The original shared storage. The default storage type of TaurusDB instances created before July 2024 is shared storage, while that of TaurusDB instances created in July 2024 and beyond is DL6.
DL6-based instances achieve zero RPO with a 3-AZ deployment and deliver better performance and higher peak throughput. They are suitable for core application systems that are sensitive to performance and have demanding requirements on storage I/O during peak hours, such as those in finance, e-commerce, government, and gaming.
- DL5
A new type of storage. With Huawei Cloud's hardware and network infrastructure technologies, DL5-based instances maintain the same high availability (zero RPO in the 3-AZ deployment) as DL6-based instances.
Although the peak performance of DL5-based instances may be a bit less than what you get with DL6-based instances, the cost per unit of capacity is a lot less. DL5-based instances are suitable for CPU-intensive sub-core business systems, or application modules that need to minimize costs.
For more information about storage types, see Storage Types.
- Instance options
Figure 3 Specifications and storage
Table 3 Specifications and storage Parameter
Description
Resource Type
Select Shared.
Instance Specifications
TaurusDB is a cloud-native database that uses the shared storage. To ensure workload stability in high read/write pressure, the system controls the read/write peaks of DB instances based on instance specifications. For details about how to select instance specifications, see Performance White Paper.
CPU Architecture
Select x86 or Kunpeng.
- x86: x86 instances use Intel® Xeon® Scalable processors and feature robust and stable computing performance. When working on high-performance networks, the instances provide the additional performance and stability that enterprise-class applications demand.
- Kunpeng: Kunpeng instances use Kunpeng 920 processors and 25GE high-speed intelligent NICs for powerful compute and high-performance networks, making them an excellent choice for enterprises needing cost-effective, secure, and reliable cloud services.
Nodes
This parameter is mandatory for multi-primary instances. Each multi-primary instance requires at least two primary nodes. You can create up to 63 primary nodes at once. All primary nodes are both readable and writable.
You can also add read/write nodes after an instance is created. For details, see Adding Read/Write Nodes to a Multi-primary Instance.
Storage
It contains the file system overhead required for inodes, reserved blocks, and database operations.
Storage of a pay-per-use instance will be scaled up dynamically based on the amount of data that needs to be stored, and is billed hourly on a pay-per-use basis.
Backup Space
TaurusDB provides free backup space equal to the amount of your used storage. After the free backup space is used up, you will be billed for the additional space on a pay-per-use basis.
Figure 4 Network
Table 4 Network Parameter
Description
VPC
A dedicated virtual network where your instance is located. It isolates networks for different workloads to enhance security.
TaurusDB allocates a default VPC (default_vpc) for your instance. You can also use an existing, new, or shared VPC.
After an instance is created, the VPC cannot be changed.
- To use an existing VPC, select an existing VPC under the current account from the drop-down list.
- To use a new VPC, create a VPC, and then select the VPC from the drop-down list.
For details about how to create a VPC, see Creating a VPC and Subnet in Virtual Private Cloud User Guide.
- To use a shared VPC, select a VPC that another account shares with the current account from the drop-down list.
With Resource Access Manager (RAM), you can share subnets in a VPC with one or more accounts, so you can easily configure and manage multiple accounts' resources at low costs.
For more information about VPC subnet sharing, see VPC Sharing in Virtual Private Cloud User Guide.
Subnet
A subnet provides dedicated network resources that are logically isolated from other networks for network security. Subnets take effect only within an AZ. Dynamic Host Configuration Protocol (DHCP) is enabled by default for subnets where DB instances are located and cannot be disabled.
Security Group
A security group enhances security by controlling access to TaurusDB from other services. When you select a security group, you must ensure that it allows the client to access DB instances.
If no security group is available or has been created, TaurusDB allocates a security group to your DB instance by default.
To ensure subsequent database connection and access, you need to allow all IP addresses to access your DB instance through port 3306 and over ICMP. If the port and protocol are not enabled for the selected security group, click Add Inbound Rule as prompted and complete the configuration in the displayed dialog box.
For details, see Configuring Security Group Rules.
Figure 5 Setting an administrator password
Table 5 Database configuration Parameter
Description
DB Instance Name
The name must start with a letter and consist of 4 to 64 characters. Only letters (case-sensitive), digits, hyphens (-), and underscores (_) are allowed.
Administrator Password
The default administrator account is root.
The administrator password must consist of 8 to 32 characters and contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters (~!@#%^*-_=+?,()&$|.). Enter a strong password and periodically change it to improve security and defend against threats such as brute force cracking attempts.
If you select a custom parameter template during instance creation, the administrator password must comply with the values of validate_password parameters in the custom parameter template. Otherwise, the instance creation will fail.
To check the parameter values, go to the Parameter Templates page, find the target parameter template and click its name. In the upper right corner of the page, search for validate_password.
Keep this password secure. The system cannot retrieve it.
Confirm Password
Enter the administrator password again.
- Advanced settings
Figure 6 Advanced settings
Table 6 Advanced settings Parameter
Description
Database Proxy
You must enable Database Proxy for multi-primary instances. Then you can use proxy addresses to connect to your databases.
Proxy Instance Specifications
You can select the proxy instance specifications as needed.
Proxy Address
IPv4 addresses are assigned automatically by default but can also be set manually.
Enabling database proxy and configuring proxy addresses when buying a DB instance are controlled by separate whitelists. To use either, submit a service ticket.
- Automatically-assigned: When you enable database proxy, TaurusDB automatically assigns an IPv4 proxy address.
- Manually-assigned: You can enter an idle IPv4 address within the subnet CIDR block as the proxy address of the TaurusDB instance.
Proxy Instance Nodes
You can create 2 to 16 proxy instance nodes.
Enterprise Project
An enterprise project provides a way to manage cloud resources and enterprise members on a project-by-project basis.
You can select an enterprise project from the drop-down list. The default project is default.
To customize an enterprise project, click Enterprise in the upper right corner of the console. The Enterprise Management page is displayed. For details, see Creating an Enterprise Project.
Parameter Template
Contains engine configuration values that can be applied to one or more instances.
In the drop-down list, you can select the default parameter template, the high-performance parameter template, or a custom parameter template in the current region as required.
If you use a custom parameter template when creating a DB instance, the specification-related parameters in the custom template will not be applied. Instead, the default values are used. For details, see What Parameters Should I Pay Attention to When Creating a DB Instance?
For more information about parameter templates, see Parameter Management. For more information about the high-performance parameter template, see Introducing the High-Performance Parameter Template.
Time Zone
You need to select a time zone for your instance based on the region hosting your instance. The time zone is selected during instance creation and cannot be changed after the instance is created.
Table Name
Specifies whether table names are case sensitive. This option cannot be changed later.
- Case sensitive: Table names are case sensitive.
- Case insensitive: Table names are case insensitive and are stored in lowercase letters by default.
Tag
Tags a DB instance. This parameter is optional. Adding tags helps you better identify and manage your DB instances. Each DB instance can have up to 20 tags.
After a DB instance is created, you can view its tag details on the Tags tab. For details, see Tag Management.
- Basic configuration
- Confirm the specifications of the pay-per-use instance.
- If you need to modify your settings, click Previous.
- If you do not need to modify your settings, click Submit.
- On the instances page, check and manage your multi-primary instance.
- During the creation process, the instance status is Creating. After the status of the instance is Available, you can use the instance.
- After the instance is created, you can confirm the DB instance type on the Instances page.
- After the instance is created, you can add a description to it.
Step 2: Connect to the Multi-primary Instance Through a Proxy Instance
- Log in to an ECS.
- Connect to the instance through a proxy address.
mysql -h hostIP -P port -u userName database -p
Table 7 Parameter description Parameter
Description
hostIP
Proxy address.
Click the multi-primary instance name, choose Database Proxy in the navigation pane, and view the proxy address in the proxy instance list.
Figure 7 Viewing a proxy address
port
Database port. The value defaults to 3306.
Click the multi-primary instance name, choose Database Proxy in the navigation pane, and view the database port in the proxy instance list.
Figure 8 Viewing a database port
userName
The username of the database administrator account. The value defaults to root.
database
Database name.
When connecting to an instance for the first time, you can choose a system database (mysql*) that comes with the instance upon creation.
The system databases are numbered sequentially based on the number of nodes. For example, if your database includes two read/write nodes, the system databases will be mysql01 and mysql02. If it includes three read/write nodes, the system databases will be mysql01, mysql02, and mysql03.
You can run the following command to query the databases of the current instance:
SELECT * FROM information_schema.schemata;
Enter the password of the database account as prompted.
Enter password:
Figure 9 Multi-primary instance connected
Follow-up Operations
- Currently, you cannot create databases for multi-primary instances on the console. To create a database, run the following command:
CREATE DATABASE dbName taurusdb_node masterId;
Figure 10 masterId specified
Figure 11 masterId not specified
- dbName: name of the database to be created
- masterId: node ID of the multi-primary instance. If this parameter is not specified, the ID of any normal node will be randomly used.
You can run the following command to obtain the node ID. In the command output, the value of MASTER_ID is the node ID.
SELECT * FROM information_schema.schemata;

- A node that contains manually created databases cannot be deleted. You can only delete such a node after all manually created databases on the node are deleted.
- Databases you created can be migrated to other nodes.
ALTER DATABASE dbName taurusdb_node masterId;
Figure 12 Migrating a database
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot