Create an ApsaraDB RDS for MySQL instance in the ApsaraDB RDS console. You can also call the CreateDBInstance API operation.
This procedure creates a billable resource. Charges begin after the instance is created. Release pay-as-you-go instances you no longer need, or verify your subscription duration before purchase.
Prerequisites
If you use a Resource Access Management (RAM) user, the AliyunRDSFullAccess and AliyunBSSOrderAccess policies must be attached to the RAM user. For details, see RAM resource authorization.
Procedure
Step 1: Open the instance creation page
Step 2: Select a billing method
Select a Billing Method.
| Billing method | When to use | Benefit |
|---|---|---|
| Subscription | Long-term, predictable workloads. Specify the Duration in the lower-left corner of the page. | Lower cost than pay-as-you-go. Longer duration = higher discount. |
| Pay-as-you-go | Short-term use, evaluation, or testing. You can later switch to Subscription. | Release the instance at any time to stop billing. |
| Serverless | Fluctuating workloads, scheduled tasks, or fully managed, operations and maintenance (O&M)-free scenarios. For details, see Serverless ApsaraDB RDS for MySQL instances. | Resources scale dynamically to match workload demand. |
The price appears in the lower-right corner of the page after you complete all configurations.
Step 3: Select a region
Select the Region for the instance.
Deploy the RDS instance in the same region as your Elastic Compute Service (ECS) instance. Same-region placement enables internal network access and optimal performance.
If the RDS and ECS instances are in different regions, the ECS instance can connect to the RDS instance only over the internet.
To connect from a device other than an ECS instance (such as a local server), select the region closest to the device and connect through the public endpoint.
The region cannot be changed after the instance is created.
To view the region of your ECS instance, see Preparations.
Step 4: Configure engine, edition, product type, and storage
4a. Select an engine
Select MySQL as the Engine. The default version is 8.0. Select a version that is the same as or later than your on-premises MySQL database.
For version lifecycle information, see Major version lifecycle.
4b. Select an edition
Select an Edition.
| Edition | Architecture | Best for |
|---|---|---|
| Basic Edition | One node | Learning, testing. Cost-effective but has longer fault recovery time. |
| High-availability Edition | One primary node + one secondary node. Supports read-only nodes. | Production environments. Covers over 80% of user scenarios. |
| Cluster Edition (Recommended) | One primary node + multiple readable secondary nodes | Multi-node high availability with readable secondaries. |
Available editions vary by region and database engine. See available editions.
Cluster Edition supports only MySQL 8.0 and 5.7.
4c. Select a product type
Select a Product Type: Standard or Yitian (available only in specific regions).
For details, see Product types.
Yitian supports only MySQL 8.0 and 5.7.
Basic Edition instances do not have product type options.
4d. Select a storage type
Select a Storage Type.
| Feature | Local SSD (Recommended) | Premium Performance Disk | ESSD (Enhanced SSD) |
|---|---|---|---|
| Maximum capacity | 16,000 GB | 64,000 GB | 64,000 GB |
| Scale-out speed | Several hours | Seconds (online) | Seconds (online) |
| Transient connections on scale-up | Yes, unless local resources are sufficient | No | No |
| Auto-scaling | Not supported | Supported | Supported |
| I/O performance | Data stored and read/written locally. Latency as low as microseconds. | Compatible with all ESSD features, plus I/O performance burst, Buffer Pool Extension (BPE), and data archiving. For details, see What is a premium performance disk?. | PL1 < PL2 < PL3. PL2 provides up to 2x the IOPS and throughput of PL1. PL3 provides up to 20x the IOPS and 11x the throughput of PL1. |
| Backup max frequency | Once per day | Once every 15 minutes | Once every 15 minutes |
| Backup speed | Long | Minutes or seconds | Minutes or seconds |
Basic Edition instances of MySQL 8.0 and 5.7 support only cloud disks.
High-availability Edition instances of MySQL 5.6 and 5.5 support only local SSDs.
For feature differences between cloud disks and local SSDs, see MySQL feature overview.
4e. (Optional) Enable disk encryption
For instances that use cloud disks, enable disk encryption.
Step 5: Configure the network
The network type is VPC.
Select a VPC.
ImportantSelect the same VPC as your ECS instance. Instances in different VPCs cannot communicate over the internal network.
Select whether to Add The CIDR Block Of The VPC To The Whitelist.
NoteIf you select No, configure a whitelist manually after the instance is created. See Configure an IP address whitelist.
Step 6: Select zone, vSwitch, and deployment solution
Zone
A zone is an independent physical area within a region (for example, Zone H, Zone I, and Zone J in China (Hangzhou)).
Zones within the same region have no significant performance difference.
An ECS instance in the same zone as the RDS instance has slightly better performance than one in a different zone within the same region.
vSwitch
A vSwitch is a basic network device within a VPC that connects cloud resources. Select an existing vSwitch or click Create A VSwitch to create one. For details, see Create and manage a vSwitch.
Deployment solution
| Option | Description |
|---|---|
| Multi-zone Deployment (Recommended) | Primary and secondary nodes are in different zones within the same region. Provides cross-zone disaster recovery. Select a Primary Zone And Network and a Secondary Zone And Network. |
| Single-zone Deployment | Primary and secondary nodes are in the same zone. |
Basic Edition instances support only Single-zone Deployment.
For Cluster Edition instances, also select the number of secondary nodes and the zones for each node.
Step 7: Select an instance type
Select a Category:
NoteBasic Edition does not support dedicated instance types.
Category Resource allocation Characteristics General-purpose Dedicated memory and I/O. Shared CPU and storage. Lower cost, high cost-effectiveness. Dedicated Dedicated CPU, memory, storage, and I/O. The dedicated-host type exclusively occupies all resources of an entire server. More stable performance. Select an Instance Type based on CPU cores and memory. For all available types, see RDS for MySQL instance types.
Test environment: 1 or more CPU cores
Production environment: 4 or more CPU cores recommended
NoteFor Cluster Edition instances, the price displayed in the console is per node. A Cluster Edition instance with one primary node and two secondary nodes has three nodes total. The total price is three times the per-node price.
Step 8: Configure database proxy
Select a Database Proxy option.
The general-purpose database proxy is free and supports read/write splitting, persistent connections, transaction splitting, connection pooling, and Secure Sockets Layer (SSL) encryption. The system selects the recommended specifications automatically. For recommended specifications, see Recommended specifications.
High-availability Edition: The database proxy is disabled by default. You can enable the general-purpose database proxy manually.
Cluster Edition: The general-purpose database proxy is enabled by default. You can disable it manually.
After the instance is created, you can change the proxy specifications and type.
Step 9: Set storage capacity
Select a Storage Capacity. The available range depends on your selected instance type and storage type. The minimum increment is 5 GB.
For High-availability Edition instances with cloud disks, enable Auto-scaling Of Storage Space. Set trigger conditions and an upper limit. When triggered, the system scales out storage by 5 GB or 15% of the current capacity, whichever is larger. This prevents the instance from being locked due to insufficient storage.
Step 10: (Optional) Configure backup retention
For Subscription instances that use a Local SSD, configure the Backup Retention Policy After Release. Select Retain Last or Retain All to prevent data loss if the instance is not renewed. For details, see Long-term backup retention.
Step 11: (Optional) Set subscription duration
For Subscription instances, specify the Duration. Longer subscription durations offer higher discounts. Hover over View Details next to Configuration Fee to see fee details.
Step 12: (Optional) Configure additional parameters
If you have no special requirements, use the default values.
| Parameter | Description |
|---|---|
| Database Port | Port number for the instance. Range: 1000 to 65534. |
| Default Storage Engine | Default is InnoDB (Open Source Default), which provides comprehensive features. Displayed only for MySQL 8.0 with High-availability Edition or Basic Edition. |
| Parameter Template | Select a high-performance, asynchronous, default, or custom parameter template. Template parameters are shown on the right. See Use a parameter template. Displayed only for High-availability Edition or Basic Edition. |
| Time Zone | Set the time zone for the instance. Displayed only for High-availability Edition or Basic Edition. |
| Case-sensitive Table Names | Default is Case-insensitive. Set to Case-sensitive if your on-premises database uses case-sensitive table names, to facilitate data migration. Displayed only for High-availability Edition or Basic Edition. |
| Instance Release Protection | Prevents accidental release of pay-as-you-go instances. See Enable or disable instance release protection. |
| Minor Version Upgrade Policy | Auto Upgrade (Recommended): Automatically upgrades to the latest minor version during the maintenance window. Change the upgrade time on the Scheduled Events page. Manual Upgrade: Upgrade manually on the Basic Information page. To pin a specific minor version, select Select Minor Version. |
| Resource Group | Select a default or custom resource group. |
| Instance Name | A descriptive name to identify the instance. |
| Tag | Attach tags for classification and management. See Filter instances by tag. |
| Privileged Account | Select Set Now and enter an account name and password to create a privileged account during instance creation, or select Set Later to create one afterward. See Create a privileged account. |
Step 13: Set quantity and confirm the order
In the upper-right corner, select the number of instances to purchase. Default is 1. Maximum is 20 instances at a time.
Review the order information, quantity, and subscription duration (for subscription instances).
Click Confirm Order and complete the payment.
For subscription instances, select Enable Auto-renewal to prevent service disruptions from missed payments.
Monthly subscriptions auto-renew for one month. Yearly subscriptions auto-renew for one year. Cancel auto-renewal at any time. See Auto-renewal.
Step 14: Verify the instance
Go to the Instances page. In the top navigation bar, select the region where the instance is located. Find the new instance by its Creation Time.
Instance creation takes approximately 1 to 10 minutes. Refresh the page to view the instance.
Next steps
After the instance is created:
Create a database and an account -- Set up your database and privileged account.
Configure an IP address whitelist -- Allow connections from specific IP addresses.
Connect to the instance -- Connect from an ECS instance, a local client, or DMS.
Configure backup settings -- Set up automated backups for data protection.
FAQ
How do I view the total number of RDS instances under my account?
Go to the RDS Overview page. This page shows the total number of RDS instances for all database engines, the regions where instances are located, and the number of running instances in each region.
Why is my newly created instance not visible in the instance list?
| Possible cause | Solution |
|---|---|
| Incorrect region selected in the console. | Switch to the correct region in the upper-left corner of the page. |
| Insufficient resources in the selected zone. A refund appears in the Orders list if creation failed. | Select another zone and try again. |
| RAM policy prohibits unencrypted instances. Local SSD instances cannot have disk encryption set at creation time. Cloud disk instances require disk encryption if this policy is active. See Use a RAM policy to restrict the permissions of a RAM user. | Set the storage type to cloud disk, enable Disk Encryption, set a key, and try again. |
References
To create an instance by calling an API operation, see CreateDBInstance.
To create other types of instances:
Appendix: Use ROS to create an instance, a database, and an account
Resource Orchestration Service (ROS) automates cloud resource deployment based on infrastructure as code (IaC). Define all required resources -- such as ECS instances and RDS database instances -- in a template. The ROS orchestration engine creates and configures them automatically.
Use the following ROS template to create and configure an RDS for MySQL instance, a database, and an account at the same time. Manage all created resources centrally through an ROS stack.
Click the quick configuration template link to open the Create Stack page in the ROS console.
Important- Resources created through ROS are real, billable products. Release the stack when you no longer need the resources to avoid unnecessary charges. - Cloud resources and their dependencies are placed in an ROS stack. View and manage them in their respective consoles or centrally through the stack.
In the upper-left corner of the top menu bar, select a region. To connect to an ECS instance over the internal network, select the same region as the ECS instance.
Enter a Stack Name (for example,
ros_test1), or use the default stack name.Under Basic Resource Configuration, select a VSwitch Zone. Instance types vary by zone. If you have no zone preference, select one that offers many instance types.
NoteThis ROS template automatically deploys a VPC and a vSwitch and connects them to the RDS instance. Select only a zone for the vSwitch.
Configure RDS parameters. This template uses the following defaults: Configure the remaining parameters:
Edition: High-availability Edition
Database Engine: MySQL
Billing Method: Pay-as-you-go
Parameter Description Instance Network Type Intranet for VPC (connects to ECS over internal network). Internet for classic network. Database Version For example, 8.0. Instance Storage Type local_ssd= local SSD.cloud_ssd= standard SSD.cloud_essd= ESSD PL1.cloud_essd2= ESSD PL2.cloud_essd3= ESSD PL3.Instance Storage Storage capacity in GB (for example, 20). Adjust in increments of 5 GB.Instance Type For evaluation, select the lowest available configuration. For long-term use, select based on your requirements. Database Name For example, demodb.Account Type Super (privileged account) or Normal (standard account). Account / Account Password Enter a username (for example, demouser) and a password that meets the requirements.(Optional) Click Configure Stack to set additional stack parameters.
ImportantIf this is your first time using ROS, select Yes for Rollback On Failure. This makes sure that if the stack fails, ROS deletes the successfully created resources, preventing charges for unused resources.
Click Next: Check And Confirm to review Parameters and Price Preview. To change configuration, click Previous: Configure Parameters.
Click Create to create the stack. Creation takes approximately 2 to 3 minutes. When the Status changes to Create Succeeded, the stack is ready.
On the stack page, click the Resources tab to view cloud resources and dependencies. Click a Resource ID to go to that resource's console page.
(Optional) Delete the stack when you finish testing. Go to the ROS console, click Stacks in the left navigation pane, find the stack, and click Delete in the Actions column. ROS releases the stack and all of its resources.