All Products
Search
Document Center

ApsaraDB RDS:Step 1: Create an ApsaraDB RDS for MySQL instance and configure databases

Last Updated:Oct 12, 2024

An ApsaraDB RDS for MySQL instance works as a database server on which you can create multiple databases to manage large amounts of business data. This topic describes how to create an RDS instance in the ApsaraDB RDS console and how to configure databases and accounts for the RDS instance. This topic also describes how to create an RDS instance and databases and accounts for the RDS instance by using a Resource Orchestration Service (ROS) template.

Prerequisites

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

Billing rules

After you create an RDS instance, you are charged for the instance and storage capacity that you select for the RDS instance. The fees that are generated for the RDS instance vary based on the billing method, RDS edition, instance type, storage type, and storage capacity. For more information, see Billable items

1. Create an RDS instance

New version

  1. Go to the ApsaraDB RDS buy page of the new version.

  2. Configure the Billing Method parameter.

    Billing method

    Description

    Benefit

    Subscription

    A subscription instance is an instance for which you pay an upfront fee. If you want to use an 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 Subscription Duration parameter in the lower part of the page.

    In most cases, the subscription billing method is more cost-effective than the pay-as-you-go billing method for long-term usage. Alibaba Cloud provides 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 based on your business requirements. The billing of a pay-as-you-go RDS instance immediately stops 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

    For more information about serverless RDS instances and how to create a serverless RDS instance, see Overview of serverless ApsaraDB RDS for MySQL instances.

    If you select Serverless, 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 . If the RDS instance and the ECS instance reside in different regions, you cannot connect these instances over an internal network. In this case, these instances cannot deliver optimal performance.

    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.

      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 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 YiTian. For more information, see Product types.

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

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

    4. Configure the Storage Type parameter.

      Item

      ESSD

      General ESSD (recommend)

      Local SSD

      Scalability

      ★★★★★

      • You can increase the storage capacity up to 64 TB.

      • No transient connections occur during storage capacity expansion.

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

      • The automatic storage expansion feature is supported.

      ★★★★★

      If your RDS instance runs MySQL or PostgreSQL, online storage capacity expansion is supported, and you can expand the storage capacity of your RDS instance within a few seconds.

      ★★

      • You can increase the storage capacity 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.

      • The automatic storage expansion feature is not supported.

      Performance

      ★★★★★

      • PL1<PL2<PL3

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

      • A PL3 ESSD delivers IOPS that is up to 20 times the IOPS delivered by a PL1 ESSD. A PL3 ESSD also delivers throughput that is up to 11 times the throughput delivered by a PL1 ESSD.

      Note

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

      ★★★★★★

      General ESSDs are compatible with all features of ESSDs, deliver better baseline performance than PL1 ESSDs, and provide the I/O burst, I/O acceleration, and data archiving features.

      For more information about the supported features, see [Product changes/Feature changes] The baseline I/O performance of the general ESSDs of ApsaraDB RDS instances is increased, Use the I/O burst feature of general ESSDs, Use the I/O acceleration feature of general ESSDs, Use the data archiving feature of general ESSDs, and What is a general ESSD?

      ★★★★★

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

      Backup

      ★★★★★

      • A backup can be completed in minutes or seconds.

      • The highest backup frequency is once every 15 minutes.

      ★★★★★

      • A backup can be completed in minutes or seconds.

      • The highest backup frequency is once every 15 minutes.

      ★★★

      • A backup requires a long period of time to complete.

      • The highest backup frequency is one backup every week.

      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 Features.

  5. Configure the Network Type parameter. The value is fixed as VPC.

    1. Configure the VPC parameter.

      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.

  6. Select the zone in which the RDS instance resides , select a vSwitch, and configure the Deployment Method parameter.

    • Select a zone.

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

      • If the RDS instance resides in the same zone 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 vSwitch.

      Select an existing vSwitch or click Create vSwitch. For more information, see Create and manage a vSwitch.

    • Select a deployment method.

      • Multi-zone Deployment: The primary RDS instance and the secondary RDS instance reside in different zones in the same region to achieve zone-disaster recovery. We recommend that you use this deployment method.

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

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

        If you select Basic Edition, you can select only the Single-zone Deployment method.

      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.

  7. Configure the Instance Type parameter.

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

      Instance type

      Description

      Benefit

      General-purpose Instance Types

      A general-purpose RDS instance occupies all 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.

      RDS instances of the general-purpose instance type are cost-effective.

      Dedicated Instance Types

      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 exclusively occupies all the 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 more information about instance types, see Primary ApsaraDB RDS for MySQL instance types.

      • In a test environment, we recommend that you select an instance type that provides one or more CPU cores.

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

      Note

      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.

  8. Configure the Database Proxy parameter.

    The general-purpose database proxy feature is provided free of charge and can be enabled on the ApsaraDB RDS buy page or after an ApsaraDB RDS instance is created. The feature supports advanced capabilities such as read/write splitting, persistent connections, transaction splitting, connection pooling, and SSL encryption. The system enables the database proxies of the recommended specifications for your RDS instance. For more information, see Procedure.

    Note
    • When you create an RDS instance that runs RDS High-availability Edition, the database proxy feature is disabled for the RDS instance. You can enable the general-purpose database proxy feature for the RDS instance.

    • When you create an RDS instance that runs RDS Cluster Edition, the general-purpose database proxy feature is enabled for the RDS instance. You can manually disable the feature.

    • You can change the types and the specifications of database proxies after you enable database proxies. For more information, see Change the types and the number of database proxies.

  9. Configure the Storage Capacity parameter.

    The valid values of the Storage Capacity parameter vary based on the instance type and storage type that you select. You can adjust 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, ApsaraDB RDS 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.

  10. Optional. 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. For more information, see Retain backup files for a long period of time.

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

    • Baseline Price: The list price of a subscription RDS instance without any discounts.

    • Preferential Monthly Fee: The monthly price that is calculated based on the baseline price of a subscription RDS instance.

      Note

      The fee is calculated based only on the list price of the RDS instance, which does not include coupons or promotions.

    • Price: You can move the pointer over View Details on the right side of the page to view the estimated total price that is calculated based on the subscription duration and the baseline price of the RDS instance.

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

    Parameter

    Description

    Port

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

    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 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

    By default, this parameter is set to Case-insensitive. If the databases in your RDS instance have case-sensitive names, we recommend that you select Case-sensitive.

    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.

    Minor Version Upgrade 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.

    Note

    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 appears.

    Resource Group

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

    Instance Description

    Enter a description for easy identification.

    Use tags to filter ApsaraDB RDS for MySQL instances

    Privileged Account

    Create a 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.

  13. In the upper-right corner of the page, configure the Quantity parameter.

    The default value is 1. You can purchase up to 20 instances at a time. Specify the number of instances based on your business requirements.

  14. Confirm the configurations, quantity, and subscription duration of the RDS instance, read and select ApsaraDB RDS Terms of Service, click Pay Now, and then complete the payment. You must configure the Subscription Duration parameter only when you select the subscription billing method for the RDS instance. The Congratulations or The service is activated message is displayed in the ApsaraDB RDS console.

    Note

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

    The auto-renewal cycle is one month for monthly subscription and one year for yearly subscription. The actual auto-renewal cycle in the order prevails. You can disable auto-renewal at any time. For more information, see Use the auto-renewal feature.

  15. View the 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 RDS instance that you created.

Old version

Step 1: Configure basic settings

  1. Go to the ApsaraDB RDS buy page of the old version.

  2. Configure the Billing Method parameter.

    Billing method

    Description

    Benefit

    Subscription

    A subscription instance is an instance for which you pay an upfront fee. If you want to use an 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 Subscription Duration parameter in the lower part of the page.

    In most cases, the subscription billing method is more cost-effective than the pay-as-you-go billing method for long-term usage. Alibaba Cloud provides 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 based on your business requirements. The billing of a pay-as-you-go RDS instance immediately stops 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

    For more information about serverless RDS instances and how to create a serverless RDS instance, see Overview of serverless ApsaraDB RDS for MySQL instances.

    If you select Serverless, 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 ECS instance . If the RDS instance and the ECS instance reside in different regions, you cannot connect these instances over an internal network. In this case, these instances cannot deliver optimal performance.

    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.

      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 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 Yitian. For more information, see Product types.

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

      • 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

      ★★★★★

      • You can increase the storage capacity up to 64 TB.

      • No transient connections occur during storage capacity expansion.

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

      • The automatic storage expansion feature is supported.

      ★★

      • You can increase the storage capacity 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.

      • The automatic storage expansion feature is not supported.

      Performance

      ★★★★★

      • PL1<PL2<PL3

      • A PL2 ESSD delivers twice the IOPS and throughput of a PL1 ESSD.

      • A PL3 ESSD delivers IOPS that is up to 20 times the IOPS delivered by a PL1 ESSD. A PL3 ESSD also delivers throughput that is up to 11 times the throughput delivered by 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 minutes or seconds.

      • The highest backup frequency is once every 15 minutes.

      ★★★

      • A backup requires a long period of time to complete.

      • The highest backup frequency is one backup every week.

      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 Features.

  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 zone 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 occupies all 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.

      RDS instances of the general-purpose instance type 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 exclusively occupies all the 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 more information about instance types, see Primary ApsaraDB RDS for MySQL instance types.

      • In a test environment, we recommend that you select an instance type that provides one or more CPU cores.

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

      Note

      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 valid values of the Storage Capacity parameter vary based on the instance type and storage type that you select.

    You can adjust 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, ApsaraDB RDS 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 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. For more information, see Retain backup files for a long period of time.

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

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

Step 2: Configure advanced settings

  1. Configure the Network Type parameter. The Network Type parameter is fixed as VPC.

    1. Configure the VPC and vSwitch of Primary Node parameters.

      Note

      We recommend that you select the 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 65534.

  2. Configure 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

    By default, this parameter is set to Case-insensitive. If the databases in your RDS instance have case-sensitive names, we recommend that you select Case-sensitive.

    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.

    Minor Version Upgrade 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 appears.

    Instance Description

    Enter a description for easy identification.

    You can add tags to distinguish multiple RDS instances to facilitate instance management. For more information, see Use tags to filter ApsaraDB RDS for MySQL instances.

    Resource Group

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

    Privileged Account

    Create a 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 configuration of the RDS instance in the Parameter Configuration section, configure the Quantity and Subscription Duration parameters, read and select Terms of Service, and then click Pay Now. You must configure the Subscription Duration parameter only if you select the subscription billing method for the RDS instance. The Congratulations or The service is activated message is displayed in the ApsaraDB RDS console.

    Note

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

    The auto-renewal cycle is one month for monthly subscription and one year for yearly subscription. The actual auto-renewal cycle in the order prevails. You can disable auto-renewal at any time. For more information, see Use the auto-renewal feature.

  2. View the 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 RDS instance that you created.

2. Create a database

  1. Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region in which your RDS instance resides, find the RDS instance, and then click the instance ID. In this topic, you must select the RDS instance that you create in Step 1 and the region in which the RDS instance resides. image

  2. In the left-side navigation pane of the page that appears, click Databases. On the page that appears, click Create Database.

  3. In the panel that appears, configure related parameters and click Create. In this example, Database Name is set to db_test1 and Supported Character Set is set to utf8. image

  4. On the Databases page, view the database that you create. image

3. Create an account

  1. In the left-side navigation pane, click Instances. On the page that appears, click the ID of the required RDS instance. In the left-side navigation pane of the page that appears, click Accounts.

  2. On the tab that appears, click Create Account to go to the Create Account panel.

    Note

    If the username of the account already exists or an account creation task is in progress, an error message may be displayed. If the error message is displayed, check whether the username of the account already exists or whether an account creation task is in progress.

  3. Configure account parameters.

    1. Configure Database Account. In this example, Database Account is set to dbuser.

    2. Configure Account Type. Valid values: Standard Account and Privileged Account. A standard account has management permissions on specific databases of an RDS instance. A privileged account has all permissions on all databases of an RDS instance. For more information about the differences between the two types of accounts, see Account types. In this example, Account Type is set to Privileged Account.

      Privileged account

      If you want to create a Privileged Account, you do not need to specify the databases that you want to manage. The privileged account has all permissions on all databases of your RDS instance.

      Important

      You can create only one privileged account for each RDS instance. If a privileged account fails to be created for your RDS instance, a privileged account is already created for the RDS instance.

      image

      Standard account

      If you want to create a Standard Account, you must specify databases that you want to manage. In the Authorize Database section, select databases from the Unauthorized Databases section, click the 图标 icon to add them to the Authorized Databases section, and then grant the Read/Write (DDL + DML), Read-Only, DDL Only, or DML Only permissions to the account. image

    3. Configure New Password and Confirm Password.

  4. Click Ok.

  5. Refresh the Accounts page to view the account that you create. image

Appendix: Use ROS to create an instance, a database, and an account

ROS is an automated deployment service that is developed by Alibaba Cloud based on the concept of infrastructure as code (IaC) and is used to simplify the management of cloud computing resources. Developers and administrators can create templates and specify the cloud computing resources such as Elastic Compute Service (ECS) instances and ApsaraDB RDS instances that you want to manage, and the dependencies between the resources in the templates. The ROS engine automatically creates and configures all resources based on a template to implement automated deployment and O&M.

You can use the ROS template provided in this topic to create and configure RDS instances, databases, and accounts at a time and use stacks to manage the created cloud resources in a centralized manner.

  1. Log on to the ROS console and go to the Create Stack page.

    Important
    • Cloud resources that are created by using ROS templates and the dependencies between the cloud resources are added to ROS stacks. You can view and manage cloud resources in the corresponding consoles of the cloud resources. You can also use stacks to manage the created cloud resources in a centralized manner.

    • The cloud resources created by using ROS templates are valid and authentic, and you are charged for resource creation and usage. If you no longer require the cloud resources in stacks, release the stacks at the earliest opportunity to prevent unnecessary costs.

  2. In the top navigation bar, select the region in which you want to create an RDS instance. If you want to connect the RDS instance and the ECS instance over an internal network, we recommend that you select the same region as the ECS instance.

  3. Specify Stack Name. You can also use the default stack name. In this example, ros_test1 is used. image

  4. In the Infrastructure Configuration section, configure VSwitch Availability Zone. Instance types vary based on the zone of the vSwitch. If you have no special requirements for the zone, you can select a zone in which a large number of instance types are provided based on the region of the RDS instance.

    Note

    In this topic, the ROS template is used to automatically deploy the virtual private cloud (VPC) and vSwitch and connect the VPC and vSwitch to the RDS instance. You need to only select the zone of the vSwitch. You do not need to focus on the creation and configuration of the VPC and vSwitch.

  5. Configure parameters in the RDS Configuration section.

    Note

    In this topic, the ROS template automatically uses the following parameter settings for your RDS instance and the database created on the RDS instance. You must configure other parameters based on your business requirements.

    • Edition: High-availability Edition

    • Database Engine: MySQL

    • Billing Method: Pay-as-you-go

    • Configure Instance Net Type. Intranet indicates a VPC, and Internet indicates the classic network. If you want to connect the RDS instance and the ECS instance over an internal network, we recommend that you set this parameter to Intranet. In this example, this parameter is set to Intranet.

    • Configure Engine Version. In this example, this parameter is set to 8.0.

    • Configure Storage Type. The value local_ssd indicates local SSD. The value cloud_ssd indicates standard SSD. The value cloud_essd indicates performance level 1 (PL1) Enterprise SSD (ESSD). The value cloud_essd2 indicates PL2 ESSD.The value cloud_essd3 indicates PL3 ESSD. In this example, this parameter is set to cloud_essd.

    • Configure Instance Storage. In this example, this parameter is set to 20 GB. You can adjust the value of this parameter at a step size of 5 GB based on your business requirements.

    • Configure Instance Class. If you want to experience or apply for a free trial for ApsaraDB RDS for MySQL, you can select the minimum configurations in the current zone to reduce costs. If you want to use ApsaraDB RDS for MySQL for a long period of time, you can select instance configurations based on your business requirements.

    • Configure DB Name. In this example, set this parameter to demodb. You can modify the name based on your business requirements.

    • Configure RDS Account Type. The value Super indicates a high-availability account. The value Normal indicates a standard account. In this example, set this parameter to Super.

    • Configure Account and Account Password. In this example, Account is set to demouser, and Account Password is set to a custom password.

  6. Optional. Configure stack parameters. You can further configure parameters for the ROS stack. If you do not need to configure a stack, you can skip this step.

    Important

    If this is the first time you use an ROS template and you are not familiar with the process of resource creation by using an ROS template, we recommend that you select Yes for Rollback on Failure. If a stack fails to be created by using the ROS template, ROS attempts to delete the created stack after the failure. This helps prevent unexpected costs.

    image

  7. Click Next in the lower-left corner to view the parameter settings and the estimated price. Before you determine to create the stack, make sure that the stack name is correct, the selected configurations meet your requirements, and the price is as expected. If you want to modify the configurations, click Previous in the lower-left corner.

  8. Click Create. The creation process requires approximately 2 to 3 minutes to complete. If the Status of the stack is Created, the stack is created and available for use. image

  9. On the stack details page, click Resources to view the cloud resources in the stack and the dependencies of the cloud resources. To view the details of a resource, click Resource ID of the resource to go to the console of the cloud resource. image

  10. Optional. Delete a stack. If the trial period of ApsaraDB RDS for MySQL ends and you want to delete the required RDS instance and related resources such as the VPC and vSwitch of the RDS instance, you do not need to separately delete the resources in different consoles. You can log on to the ROS console, go to the Stacks page, find the required stack, and then click Delete in the Actions column. This way, ROS releases the stack, and all resources and dependencies in the stack are also deleted. image

FAQ

How do I view the total number of RDS instances within my Alibaba Cloud account?

On the Overview page of the ApsaraDB RDS console, you can view the total number of RDS instances that run different database engines within your Alibaba Cloud account. On this page, you can also view the regions of the RDS instances and the number of running RDS instances in each region.

image

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

Possible cause

Description

Suggestion

Incorrect region

The region that you selected is not the region in which the RDS instance resides.

In the top navigation bar, select the region in which the RDS instance resides. Then, you can find the RDS instance.

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 cloud 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 Cloud Disk Encryption, configure the Key parameter, and then try again.

Can I manage accounts at fine-grained levels, such as the source IP address level and the table level?

Does ApsaraDB RDS provide accounts that are equivalent to root or superuser accounts?

No, ApsaraDB RDS does not provide accounts that are equivalent to root or superuser accounts. This way, your RDS instance can be protected from data loss and leaks that are caused by accidental operations.

References