This topic describes how to create a PolarDB for MySQL cluster in the PolarDB console.

Prerequisites

An Alibaba Cloud account is created and is used to log on to the Alibaba Cloud Management Console. For more information, see Register and log on to an Alibaba Cloud account.

Background information

Note
  • PolarDB supports virtual private clouds (VPCs). Each VPC is an isolated network on Alibaba Cloud and is more secure than the classic network.
  • To achieve optimal performance of PolarDB , we recommend that you use Elastic Compute Service (ECS) instances that are deployed in the same VPC to access PolarDB . PolarDB PolarDB If your ECS instance is deployed in the classic network, you must migrate the instance to a VPC.

Procedure

  1. Log on PolarDB console.
  2. In the upper-left corner of the page, click Create Cluster.
  3. Select Subscription or Pay-As-You-Go as Product Type.
    • Subscription: An upfront payment is required for the compute nodes when you create the cluster. You are charged for the consumed storage space by hour. The charges are deducted from your account balance on an hourly basis.
    • Pay-As-You-Go: This method does not require upfront payments. You are charged for the compute nodes and consumed storage space by hour. The charges are deducted from your account balance on an hourly basis.
  4. Specify the following parameters.
    Parameter Description
    Region The region where the cluster resides. You cannot change the region after the cluster is created.
    Note Make sure that the PolarDB cluster and the Elastic Compute Service (ECS) instance to be connected are deployed in the same region. Otherwise, the cluster and the ECS instance cannot communicate over the internal network and can communicate over only the Internet. This compromises performance.
    Create Type The method to create a PolarDB cluster.
    • Create Primary Cluster: creates a PolarDB cluster.
    • Create Secondary Cluster: creates a secondary cluster that is deployed in a global database network (GDN). For more information about how to create a secondary cluster, see Create a secondary cluster.
    • Migration from RDS: creates a PolarDB for MySQL cluster by cloning the data of an ApsaraDB RDS for MySQL instance and synchronizing incremental data from the RDS instance to the PolarDB for MySQL cluster. This method is often used for data migration. The read/write status of the PolarDB cluster is Read Only before reverse data migration is started. By default, the binary logging is enabled. For more information, see Create a PolarDB for MySQL cluster by using the Migration from RDS method.
      • RDS Engine Type: the engine type of the source RDS instance. The value of this parameter can be only MySQL. You do not need to specify this parameter.
      • RDS Engine Version: the engine version of the source RDS instance. The value of this parameter can be 5.6 or 5.7.
      • Source RDS Instance: the available source RDS instances that exclude read-only instances.
        Note You can select an RDS instance from the available source instances that exclude read-only instances. You cannot select the RDS instances where the transparent data encryption (TDE) or secure sockets layer (SSL) feature is enabled or part of the data is not stored in the InnoDB storage engine. When you restore data from a backup file to the PolarDB cluster, the source instance runs as expected.
    • Clone from RDS: creates a PolarDB cluster by cloning the data of an RDS instance. For more information, see Create a PolarDB for MySQL cluster by using the Clone from RDS method.
      • RDS Engine Type: the engine type of the source RDS instance. The value of this parameter can be only MySQL. You do not need to specify this parameter.
      • RDS Engine Version: the engine version of the source RDS instance. The value of this parameter can be 5.6 or 5.7.
      • Source RDS Instance: the available source RDS instances that exclude read-only instances.
        Note You can select an RDS instance from the available source instances that exclude read-only instances. You cannot select the RDS instances where the TDE or SSL feature is enabled or part of the data is not stored in the InnoDB storage engine. When you restore data from a backup file to the PolarDB cluster, the source instance runs as expected.
    • Restore from Recycle: creates a cluster by restoring a backup file of a deleted cluster from the recycle bin.
      • Source Version: the version of the cluster that has been deleted.
      • Deleted Clusters: the name of the cluster that has been deleted.
      • Backup History: the backup file that you want to restore.
    Primary Availability Zone The primary zone where the cluster is deployed.
    • Each zone is an independent geographical location in a region. The zones that are deployed in the same region are similar.
    • You can deploy your PolarDB cluster and ECS instance in the same zone or in different zones.
    • You need only to select the primary zone. The system automatically selects a secondary zone.
    Network Type The type of the network. The value of this parameter can be only VPC. You do not need to specify this parameter.
    Note If you need to use the classic network, you must select a VPC first, and configure the classic network after the cluster is created. For more information, see VPC-facing endpoints and public-facing endpoints.
    VPC

    VSwitch

    Make sure that the PolarDB cluster and the ECS instance to be connected are deployed in the same VPC. Otherwise, the cluster and the ECS instance cannot communicate over the internal network. This compromises performance.
    • If you have created a VPC that meets your network plan, select the VPC. For example, if you have created an ECS instance and the VPC where the ECS instance resides meets your network plan, select this VPC.
    • Otherwise, use the default VPC and the default VSwitch.
      • Default VPC:
        • The default VPC is a unique VPC in the selected region.
        • The subnet mask for the default VPC consists of 16 bits, such as 172.31.0.0/16. A maximum of 65,536 private IP addresses can be provided.
        • The default VPC is not included in the total number of VPCs that you can create.
      • Default VSwitch:
        • The default VSwitch is a unique VSwitch in the selected zone.
        • The subnet mask for the default VSwitch consists of 20 bits, such as 172.16.0.0/20. A maximum of 4,096 private IP addresses can be provided.
        • The default VSwitch is not included in the total number of VSwitches that you can create in a VPC.
    • If the default VPC and VSwitch cannot meet your business requirements, you can create your own VPC and VSwitch. For more information, see Create a VPC.
    Compatibility
    • MySQL 8.0: fully compatible with MySQL 8.0. MySQL 8.0 supports parallel queries. In specific scenarios such as TPC-H tests, the performance increases by 10 times after parallel queries are used. For more information, see Parallel queries.
    • MySQL 5.7: fully compatible with MySQL 5.7.
    • MySQL 5.6: fully compatible with MySQL 5.6.
    • PostgreSQL 11: fully compatible with PostgreSQL 11.
    • Compatible with Oracle Syntax: compatible with the Oracle syntax
    Edition

    The edition of the cluster. Only Standard (2-16 Nodes) (Recommended) is supported. Use the default setting. You do not need to specify the parameter.

    Node Specification

    The node specification of the cluster. Select the specification based on your business requirements. All the nodes in the cluster are dedicated nodes. The dedicated nodes offer stable and reliable performance. For more information about the specifications, see Specifications and pricing.

    Nodes
    The number of nodes to be created. By default, the system creates a primary node and a read-only node. The read-only node has the same specification as the primary node. You do not need to specify this parameter.
    Note If the primary node fails, the system uses the read-only node as the primary node and generates another read-only node. For more information about read-only nodes, see Architecture.
    Storage Cost The storage cost of the cluster. You do not need to specify this parameter. You are charged for the consumed storage space on an hourly basis. For more information, see Specifications and pricing.
    Note You do not need to specify the storage capacity when you create a cluster. The system automatically increases or decreases the storage capacity based on the volume of the data to be stored.
    Time Zone The time zone of the cluster. The default value is UTC+08:00.
    Note This parameter is available only when the Compatibility parameter is set to MySQL 8.0, MySQL 5.7, or MySQL 5.6 for the PolarDB cluster.
    Table Name Case Sensitivity Specifies whether table names are case-sensitive. The default value is Not Case-sensitive. If table names are case-sensitive in your on-premises database, we recommend that you select Case-sensitive. This ensures that you can migrate data in an easy way.
    Note
    • This parameter is available only when the Compatibility parameter is set to MySQL 8.0, MySQL 5.7, or MySQL 5.6 for the PolarDB cluster.
    • The value of this parameter cannot be changed after the cluster is created. Proceed with caution.
    Release Cluster The backup retention policy that is used after the cluster is deleted or released. The default value is Retain Last Automatic Backup (Automatic Backup before Release).
    • Retain Last Automatic Backup (Automatic Backup before Release): retains the last backup after you delete the cluster.
    • Retain All Backups: retains all the backups after you delete the cluster.
    • Retain No Backups (Cannot be Restored): retains no backups after you delete the cluster.
    Note
    • This parameter is available only when the Compatibility parameter is set to MySQL 8.0, MySQL 5.7, or MySQL 5.6 for the PolarDB cluster.
    • If you need to retain backups after you delete or release the cluster, you may need to pay a few fees. You can delete the backups to reduce costs. For more information, see Data backup pricing.
    Enable TDE Specifies whether to enable TDE. After TDE is enabled, PolarDB encrypts the data files of your cluster. You do not need to modify the code to allow access to the services. The read and write performance is reduced by 5% to 10%.
    Note
    • This parameter is available only when the Compatibility parameter is set to PostgreSQL 11 or Compatible with Oracle Syntax for the cluster.
    • You cannot disable TDE after TDE is enabled.
    Cluster Name The name of the cluster. The name must meet the following requirements:
    • It cannot start with http:// or https:// .
    • It must be 2 to 256 characters in length.

    If you leave this parameter empty, the system automatically generates a cluster name. You can change the cluster name after the cluster is created.

    Resource Group The resource group of the cluster. Select a resource group from the created resource groups. For more information about how to create a resource group, see Create a resource group.
    Note A resource group is a container that includes a group of resources in an Alibaba Cloud account. You can perform centralized management on these resources. A resource belongs to only one resource group. For more information about resource groups, see Use RAM to create and authorize resource groups.
  5. Specify Purchase Plan and Number for the cluster and click Buy Now. You can specify the purchase plan for only the subscription clusters.
    Note You can create a maximum of 50 clusters at a time. For example, you can create multiple clusters in scenarios such as enabling multiple game servers at a time.
  6. On the Confirm Order page, confirm your order information. Read the terms of the service agreement, select the check box, and click Buy Now.
  7. On the Purchase page, confirm the unpaid order and the payment method and click Purchase.
  8. After you pay for the order, wait for 10 to 15 minutes. Then, you can view the newly created cluster on the Clusters page.
    Note
    • If nodes in the cluster are in the Creating state, the cluster is being created and is unavailable. The cluster is available only if it is in the Running state.
    • Make sure that you have selected the region where the cluster is deployed. Otherwise, you cannot view the cluster.

What to do next

Configure a whitelist for a cluster

Related API operations

API Description
CreateDBCluster Creates a PolarDB cluster.
DescribeDBClusters Queries PolarDB clusters.
DescribeDBClusterAttribute Queries the information about a specified PolarDB cluster.
DescribeAutoRenewAttribute Queries the auto-renewal status of a specified subscription cluster for PolarDB .
ModifyAutoRenewAttribute Modifies the auto-renewal settings for a specified subscription cluster for PolarDB .