This topic describes how to create a PolarDB MySQL cluster by using the console.

Prerequisites

You must have registered an Alibaba Cloud account or created a Resource Access Management (RAM) user account.

Background information

A PolarDB cluster contains one primary node and a maximum of 15 read-only nodes. (At least one read-only node is required to provide active-active high availability support.) A node is a virtual database server, where you can create and manage multiple databases.

Note
  • ApsaraDB for PolarDB supports Virtual Private Cloud (VPC) only. VPC is an isolated network in Alibaba Cloud that is more secure than a classic network.

  • You can use PolarDB with Elastic Compute Service (ECS). We recommend that your PolarDB cluster and ECS instance reside in the same VPC to achieve optimal performance. If your ECS instance is created in a classic network, you need to migrate it to a VPC.

Procedure

  1. Log on to your Alibaba Cloud account.
  2. Click Create Cluster to go to the ApsaraDB for PolarDB purchase page.
  3. Select Subscription or Pay-As-You-Go.
    Note
    • Subscription: You need to pay for the compute nodes (a primary node and a read-only node) when you create a cluster. Storage consumed by your databases is billed in GB/hour increments and the charges are deducted from your account on an hourly basis. The subscription method is more cost-effective if you want to use the new cluster for a long period of time. You can save more with longer subscription periods.
    • Pay-As-You-Go: This method does not require any upfront payment. Compute nodes and storage consumed by your databases are billed on an hourly basis and the charges are deducted from your account. We recommend that you select Pay-As-You-Go for short term use. You can save costs by releasing the cluster when it is no longer required.
  4. Configure the following parameters.
    Console section Parameter Description
    Basic Region The region where the cluster resides. You cannot change the region after you confirm your order.
    Note Make sure that the cluster is created in the same region as the ECS instance that you want to connect. Otherwise, the cluster and ECS instance cannot communicate through the internal network. They can only communicate through the public network and cannot achieve optimal performance.
    Create Type The method to create an ApsaraDB for PolarDB cluster.
    • Default Create Type: creates a new ApsaraDB for PolarDB cluster.
    • Clone from RDS: clones the data of the selected RDS instance to an ApsaraDB for PolarDB cluster. For more information, see Clone data from RDS MySQL to POLARDB for MySQL with one click.
      • RDS Engine Type: the engine type of the source RDS instance, which cannot be changed.
      • RDS Engine Version: the engine version of the source RDS instance, which cannot be changed.
      • Source RDS Instance: lists the available source RDS instances, excluding read-only instances.
    • Migration from RDS: first clones the data of the selected RDS instance to an ApsaraDB for PolarDB cluster and then performs incremental data synchronization. This method is often used for data migration. The PolarDB cluster is read-only before data migration is started and binary log is enabled by default. For more information, see Upgrade RDS MySQL to POLARDB for MySQL with one click.
      • RDS Engine Type: the engine type of the source RDS instance, which cannot be changed.
      • RDS Engine Version: the engine version of the source RDS instance, which cannot be changed.
      • Source RDS Instance: lists the available source RDS instances, excluding read-only instances.
    Primary Availability Zone The ID of the primary zone to which the cluster belongs.
    • Each zone is an independent geographical location that resides in a region. No difference exists between zones.
    • You can deploy your cluster and ECS instance in the same zone or in different zones.
    • You only need to select a primary zone. The system automatically selects a secondary zone.
    Network Type
    • The type of the network. Use the default setting.
    • ApsaraDB for PolarDB supports VPC only. A VPC is an isolated virtual network with higher security and performance than a classic network.
    VPC

    VSwitch

    Make sure that you place your cluster in the same VPC as the ECS instance you want to connect. Otherwise, the cluster and ECS instance cannot communicate through the internal network to achieve optimal performance.
    • Select the VPC if you have created a VPC that meets your network plan. For example, you can select this VPC if you have created an ECS instance and the VPC where it resides meets your network plan.
    • Otherwise, we recommend that you use the default VPC and VSwitch.
      • Default VPC:
        • It is a unique VPC in your selected region.
        • The network mask for a default VPC consists of 16 bits, such as 172.31.0.0/16, providing up to 65,536 internal IP addresses.
        • It is not counted against the total number of VPCs that you can create.
      • Default VSwitch:
        • It is a unique VSwitch in your selected zone.
        • The network mask for a default VSwitch consists of 20 bits, such as 172.16.0.0/20, providing up to 4,096 private IP addresses.
        • It is not counted against the total number of VSwitches that you can create in a VPC.
    • You can create your own VPC and VSwitch if the default VPC and VSwitch cannot satisfy your business requirements.
    Instance Compatibility
    • Fully compatible with MySQL 8.0. PolarDB MySQL 8.0 provides parallel query. Performance in specific scenarios (measured by TPC-H tests) increase tenfold. For more information, see Parallel query.
    • Fully compatible with MySQL 5.6.
    • Compatible with Oracle (high compatibility).
    Node Specification The node specification of the new cluster. Select a specification that satisfies your business requirements. All ApsaraDB for PolarDB nodes are dedicated nodes with stable and reliable performance. For more information, see Specifications and pricing.
    Number Nodes
    • The number of nodes in the new cluster. Use the default setting. By default, the system creates a read-only node that has the same specification as the primary node.
    • If the primary node fails, the system will switch the read-only node to serve as the primary node, and generate a new read-only node.
    • For more information about health check, see Architecture.
    Storage Cost You do not need to specify this parameter. The system will charge you on an hourly basis based on the actual data usage. For more information, see Specifications and pricing.
    Note You do not need to specify the storage capacity when you purchase a cluster. The storage capacity will automatically adapt based on your data usage.
  5. Specify Purchase Plan (only applicable to subscription clusters) and Number, and click Buy Now.
    Note A maximum of 50 clusters can be created at a time, which is suitable for business scenarios such as launching multiple gaming servers at a time.
  6. On the order confirmation page, confirm your order information, read and accept the ApsaraDB for PolarDB Subscription Agreement of Service, and then click Pay.

After the payment is complete, about 10 minutes are required to create the cluster. The new cluster is then displayed in the cluster list.

Note
  • However, the cluster may be unavailable and require extra time before it is created (even though its nodes are in the Running state). The cluster is only available when it is in the Running state.
  • Make sure that you have selected the corresponding region. Otherwise, you cannot view your clusters.

Next step

Configure the IP address whitelist for a cluster

Related API operations

API operation Description
CreateDBCluster Creates a PolarDB cluster.
DescribeDBClusters Queries PolarDB clusters.
DescribeDBClusterAttribute Queries the detailed information of a specified PolarDB cluster.
DescribeAutoRenewAttribute Queries the auto renewal details of subscription PolarDB clusters.
ModifyAutoRenewAttribute Sets the auto renewal attributes for a specified subscription PolarDB cluster.