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

Prerequisites

You need to register an Alibaba Cloud account and log on to the console with the account. For more information, see Register and log on to an Alibaba Cloud 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). 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. Login ApsaraDB for PolarDB console.
  2. On the upper-left corner of the page, click Create Cluster.
  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.
    • Create Primary Cluster: creates a new ApsaraDB for PolarDB cluster.
    • Create Secondary Cluster: creates a secondary cluster in a Global Database Network (GDN).
    • 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 Create a PolarDB for MySQL cluster from an ApsaraDB RDS for MySQL instance.
      • 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.
        Note A list of selectable source instances, excluding read-only instances. TDS/SSL functionality and RDS instances containing non-InnoDB engines are not supported. Restored from backup file PolarDB does not affect the normal operation of the source instance.
    • 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 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.
        Note A list of selectable source instances, excluding read-only instances.TDS/SSL functionality and RDS instances containing non-InnoDB engines are not supported. Restored from backup file PolarDB does not affect the normal operation of the source instance.
    • Restore from Recycle: creates a new cluster by restoring a backup of a deleted cluster from the recycle bin.
      • Source version: select the version of deleted clusters.
      • Deleted cluster: select the deleted cluster.
      • Backup History: select the backup that you want to restore.
    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. The default value is VPC and cannot be changed.
    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.
    Enable TDE Specify whether enable TDE or not. After enabling TDE encryption, PolarDB will encrypt cluster data files, which is transparent to business access and will have 5% ~ 10% performance loss.
    • Enable-TDE option is only available when you choose the Compatibility as PolarDB PostgreSQL or PolarDB compatible with Oracle Syntax.
    • TDE cannot be turned off after it is turned on
  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 Confirm Order page, confirm your order information, read and accept the ApsaraDB for PolarDB Subscription Agreement of Service, and then click Pay.
  7. On the Purchase page, confirm the order information and payment method, and then click Purchase.
  8. After purchasement, it may take 1 to 5 minutes to activate the service you ordered. Then you can view the new cluster you just created on the Clusters page.
    Note
    • However, the cluster may be unavailable and require extra time before it is created (even though its nodes are in the Creating 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 a whitelist

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.