All Products
Search
Document Center

ApsaraDB RDS:Create an ApsaraDB RDS for MySQL instance

Last Updated:Feb 02, 2024

This topic describes how to create an ApsaraDB RDS for MySQL instance.

Prerequisites

The AliyunRDSFullAccess and AliyunBSSOrderAccess policies are attached to the RAM user that you use to create the RDS instance. For more information, see Use RAM for resource authorization.

Procedure

Step 1: Configure basic settings

  1. Go to the ApsaraDB RDS buy page.

  2. Configure the Billing Method parameter.

    Billing method

    Description

    Benefit

    Subscription

    A subscription RDS instance is an instance for which you pay an upfront fee. If you want to use an RDS instance for a long period of time, we recommend that you select the Subscription billing method. If you select the subscription billing method, configure the Duration parameter in the lower-left corner of the page.

    The subscription billing method is more cost-effective than the pay-as-you-go billing method. You are offered lower prices for longer subscription durations.

    Pay-as-you-go

    You are charged an hourly fee for a pay-as-you-go instance based on your actual resource usage. For short-term use, we recommend that you select the Pay-As-You-Go billing method.

    You can create a pay-as-you-go RDS instance. After you confirm that the created RDS instance meets your business requirements, you can change the billing method of the RDS instance to subscription.

    You can release a pay-as-you-go RDS instance at any time. The billing of a pay-as-you-go RDS instance stops immediately after you release the RDS instance.

    Serverless

    If you want to run scheduled tasks, your workloads frequently change, or the workloads are fully managed or do not require O&M, we recommend that you select Serverless.

    Note

    You are charged based on your consumption of resources for workloads. This can help reduce costs.

    Note

    You can view the price in the lower-right corner of the page. The price is displayed only after you configure all required parameters.

  3. Configure the Region parameter.

    We recommend that you create the RDS instance in the same region as the Elastic Compute Service (ECS) instance on which your application is deployed. If the RDS instance and the ECS instance reside in different regions, they cannot use an internal network to communicate with each other. This affects the performance of your application.

    Note
    • After an RDS instance is created, you cannot change the region of the RDS instance. If you want to connect an ECS instance and an RDS instance over an internal network, make sure that the RDS instance and the ECS instance reside in the same region.

    • For more information about how to view the region in which an ECS instance resides, see Get ready to use ApsaraDB RDS for MySQL.

    • If your application is deployed on an on-premises server or computer, we recommend that you select a region that is near your on-premises server or computer. This way, you can use the public endpoint of the RDS instance to connect to the RDS instance from your application.

  4. Configure the Database Engine, Edition, Product Type, and Storage Type parameters.

    1. Configure the Database Engine parameter.

      Select MySQL.

      We recommend that you select MySQL 8.0 or select the database engine version that is run on your self-managed MySQL instance. The default value of this parameter is MySQL 8.0.

      Note
      • Serverless RDS instances support MySQL 5.7 and MySQL 8.0.

      • For more information about the lifecycles of MySQL versions in ApsaraDB RDS for MySQL, see Lifecycles of major engine versions.

    2. Configure the Edition parameter.

      RDS edition

      Description

      Benefit

      RDS Basic Edition

      In RDS Basic Edition, the database system consists of only one primary RDS instance.

      RDS Basic Edition is cost-effective and is suitable for learning and testing scenarios.

      RDS instances that run RDS Basic Edition require a long period of time to restart or recover from faults.

      RDS High-availability Edition

      In RDS High-availability Edition, the database system consists of a primary RDS instance and a secondary RDS instance. These instances work in high availability (HA) mode. You can create read-only RDS instances and attach the read-only RDS instances to the primary RDS instance.

      RDS High-availability Edition is suitable for more than 80% of production environments.

      RDS Cluster Edition

      We recommend that you use this RDS edition. In RDS Cluster Edition, the database system consists of a primary node and multiple secondary nodes.

      These nodes work in HA mode. The secondary nodes support read operations.

      Note
      • The available RDS editions vary based on the region and database engine that you select.

      • RDS Cluster Edition supports MySQL 8.0 and MySQL 5.7.

      • For more information, see Overview.

    3. Configure the Product Type parameter.

      You can select Standard or Economy. For more information, see Product types.

      Note
      • Economy RDS instances support only MySQL 8.0.

      • If your RDS instance runs RDS Basic Edition, you do not need to configure this parameter.

    4. Configure the Storage Type parameter.

      Item

      ESSD (recommended)

      Local SSD

      Scalability

      ★★★★★

      • The storage capacity can reach up to 32 TB.

      • No transient connections occur during storage capacity expansion.

      • You can upgrade, downgrade, create, or release an RDS instance within minutes.

      • Automatic storage expansion is supported.

      ★★

      • The storage capacity can reach up to 6 TB.

      • Transient connections occur during storage capacity expansion.

      • A few hours may be required to upgrade, downgrade, create, or release the RDS instance.

      • Automatic storage expansion is not supported.

      Performance

      ★★★★★

      • PL1<PL2<PL3

      • A performance level 2 (PL2) enhanced SSD (ESSD) delivers twice the IOPS and throughput of a PL1 ESSD.

      • A PL3 ESSD provides 20 times the IOPS and 11 times the throughput of a PL1 ESSD.

      Note

      ApsaraDB RDS provides three storage types. For more information, see Storage types.

      ★★★★★

      I/O latencies are reduced, and I/O performance is improved.

      Backup

      ★★★★★

      • A backup can be completed in a few minutes or seconds.

      • The highest backup frequency is once every 15 minutes.

      ★★★

      • A backup requires a long period of time.

      • The highest backup frequency is one backup every day.

      Note
      • RDS instances that run MySQL 5.7 or MySQL 8.0 on RDS Basic Edition support only cloud disks. RDS instances that run MySQL 5.5 or MySQL 5.6 on RDS High-availability Edition support only local disks. Serverless RDS instances support only cloud disks.

      • The available features vary based on the storage type that you select. For more information, see MySQL 8.0.

  5. Select the zone in which the RDS instance resides.

    • Select a zone.

      • No substantive differences exist between zones in the same region.

      • If the RDS instance resides in the same region as the ECS instance that you want to connect, these instances can deliver optimal performance. If the RDS instance and the ECS instance reside in different zones in the same region, the performance of these instances slightly decreases.

    • Select a deployment method.

      • Multi-zone Deployment: This is the recommended deployment method. The primary RDS instance and the secondary RDS instance reside in different zones to achieve zone-disaster recovery.

        If you set the Deployment Method parameter to Multi-zone Deployment, you must configure the Zone of Primary Node and Zone of Secondary Node parameters.

      • Single-zone Deployment: The primary RDS instance and the secondary RDS instance reside in the same zone.

        If you set the Edition parameter to Basic Edition, only the Single-zone Deployment method is supported.

      Note
      • If your database system consists of primary and secondary RDS instances, we recommend that you select Multi-zone Deployment to achieve cross-zone disaster recovery.

      • If you set the Edition parameter to Cluster Edition, you must select the number of secondary nodes and the zones of the primary and secondary nodes.

  6. Configure the Instance Type parameter.

    1. Configure the Category parameter. You can select General-purpose or Dedicated.

      Instance type

      Description

      Benefit

      General-purpose

      A general-purpose RDS instance exclusively occupies the allocated memory and I/O resources.

      A general-purpose RDS instance shares CPU and storage resources with other general-purpose RDS instances that are deployed on the same host.

      General-purpose RDS instances are cost-effective.

      Dedicated

      A dedicated RDS instance exclusively occupies the allocated CPU, memory, storage, and I/O resources.

      Note

      The dedicated host instance family is the highest configuration of the dedicated instance family. A dedicated host RDS instance occupies all CPU, memory, storage, and I/O resources of the host on which the RDS instance is deployed.

      A dedicated RDS instance can deliver higher performance and higher stability.

      Note

      An RDS instance that runs RDS Basic Edition does not support the dedicated instance family.

    2. Configure detailed specifications, including CPU cores and memory capacity.

      • For a test environment, select an instance type that provides one or more cores.

      • For a production environment, select an instance type that provides four or more cores.

      Note

      For more information about instance types, see Primary ApsaraDB RDS for MySQL instance types (x86).

      If you set the Edition parameter to Cluster Edition, the Pricing column displays the price per node in the cluster. If you purchase one primary node and two secondary nodes for the cluster, the price of the cluster is triple the price that is displayed in the Pricing column.

  7. Configure the Storage Capacity parameter.

    The value range of the storage capacity varies based on the instance type and storage type that you select.

    You can change the storage capacity at a step size of 5 GB.

    Note

    If you select High-availability Edition and the standard SSD or ESSD storage type, you can select Automatic Storage Expansion. You can specify the conditions based on which automatic storage expansion is triggered and the upper limit for storage capacity. If automatic storage expansion is triggered, the system automatically increases the storage capacity based on the larger value between 5 GB and 15% of the current storage capacity. This helps prevent the RDS instance from being locked due to insufficient storage resources.

  8. Optional. If you set the Billing Method parameter to Subscription and select the Local SSD storage type, configure the following parameters.

    • If you set the Billing Method parameter to Subscription and select the Local SSD storage type, configure the Backup Retention After Release parameter. We recommend that you select Latest or All. This way, you can retrieve the data if the data is lost due to overdue payments.

    • If you set the Billing Method parameter to Subscription, configure the Duration parameter based on your business requirements.

  9. In the lower-right corner of the page, click Next: Instance Configuration.

Step 2: Configure advanced settings

  1. Configure the Network Type parameter.

    Note

    The default value is VPC.

    1. Configure the VPC and VSwitch parameters.

      Note

      We recommend that you select the virtual private cloud (VPC) in which your ECS instance resides for the RDS instance. If the RDS instance and the ECS instance reside in different VPCs, these instances cannot communicate over an internal network.

    2. Configure the Add to Whitelist parameter to specify whether to add the CIDR block of the selected VPC to a whitelist of the RDS instance.

      Note

      If you set the Add to Whitelist parameter to No, you can configure a whitelist after the RDS instance is created. For more information, see Configure an IP address whitelist.

    3. Configure the Port parameter.

      You can initialize the port when you create an RDS instance. Valid values: 1000 to 5999.

  2. Configure more custom parameters. If you do not have special business requirements, you can retain the default values of these parameters.

    Parameter

    Description

    Default Storage Engine

    • InnoDB: an open source default storage engine that can provide comprehensive features. This is the recommended storage engine.

    • X-Engine: developed by Alibaba. X-Engine is compatible with InnoDB and provides a high compression ratio. This helps save more than 60% of storage capacity.

    Note

    This parameter is available only when you select MySQL 8.0 and High-availability Edition or Basic Edition in the previous step.

    Parameter Template

    Select the high-performance, asynchronous, default, or custom parameter template based on your business requirements. The parameters in the parameter template are displayed on the right. For more information, see Use a parameter template.

    Note

    This parameter is available only when you select High-availability Edition or Basic Edition in the previous step.

    Time Zone

    Select a time zone for the RDS instance.

    Note

    This parameter is available only when you select High-availability Edition or Basic Edition in the previous step.

    Table Name Case Sensitivity

    Specify whether the table name is case-sensitive. Default value: Case-insensitive. If the names of on-premises databases are case-sensitive, we recommend that you select Case-sensitive to facilitate data migration.

    Note

    This parameter is available only when you select High-availability Edition or Basic Edition in the previous step.

    Release Protection

    Specify whether to enable the release protection feature. The release protection feature is used to prevent a pay-as-you-go RDS instance from being released due to unintended operations. For more information, see Enable or disable the release protection feature for an ApsaraDB RDS for MySQL instance.

    Minor Engine Version Update Policy

    Configure a policy based on which the minor engine version of the RDS instance is updated.

    • Automatic Upgrade: The system automatically updates the minor engine version of the RDS instance to the most recent version during the maintenance window. We recommend that you use this method. You can change the update time on the Scheduled Events tab. For more information, see Configure a maintenance window and Manage scheduled events.

    • Manual Upgrade: You must manually update the minor engine version of the RDS instance on the Basic Information page.

    If you do not want to use the latest minor engine version, select Select Minor Engine Version. Then, you can select a minor engine version from the drop-down list that is displayed.

    Resource Group

    Use the default resource group or select a custom resource group based on your business requirements. This facilitates instance management.

    Privileged Account

    If you select Configure Now, you must configure the Database Account, Password, and Confirm Password parameters. If you select Configure Later, you can create a privileged account after the RDS instance is created.

    For more information about privileged accounts, see Create a privileged account.

  3. In the lower-right corner of the page, click Next: Confirm Order.

Step 3: Confirm the order

  1. Confirm the settings in the Parameters section, configure the Purchase Plan and Duration parameters, read and select Terms of Service, click Pay Now, and then complete the payment. You must configure the Duration parameter only when you select the subscription billing method for the RDS instance.

    Note

    If you select the subscription billing method for the RDS instance, we recommend that you select Auto-Renew Enabled. This prevents interruptions on your application even if you forget to renew the RDS instance.

    The Congratulations. or "The service is activated message is displayed in the ApsaraDB RDS console.

  2. View the new RDS instance.

    Go to the Instances page. In the top navigation bar, select the region in which your RDS instance resides. Then, find the RDS instance based on the Creation Time parameter.

    Note

    It requires 1 to 10 minutes to create an RDS instance. You can refresh the page to view the new RDS instance.

What to do next

Create databases and accounts for the RDS instance. For more information, see Create databases and accounts.

FAQ

After I create an RDS instance, why am I unable to find the RDS instance?

Cause

Description

Suggestion

Incorrect region

The RDS instance does not reside in the region that you selected.

In the top navigation bar, select the region in which the RDS instance resides.

Insufficient resources

The zone that you selected cannot provide sufficient resources.

If the RDS instance cannot be created, you can go to the Orders page in the Billing Management console to view the refunded fees.

Select a different zone and try again.

RAM policies that do not allow users to create unencrypted RDS instances

RAM policies that do not allow users to create unencrypted RDS instances are attached to a RAM user.

  • If you use the credentials of the RAM user to create an RDS instance that uses local disks, the RDS instance cannot be created. When you create an RDS instance that uses local disks, you cannot enable cloud disk encryption.

  • If you use the credentials of the RAM user to create an RDS instance that uses cloud disks and you do not enable disk encryption for the RDS instance, the RDS instance cannot be created.

For more information, see Use RAM policies to manage the permissions of RAM users on ApsaraDB RDS instances.

When you create an RDS instance, select the standard SSD or ESSD storage type, select Disk Encryption, set the Key parameter, and then try again.

References