ApsaraDB RDS supports MySQL 8.0 with DuckDB as the storage engine, providing a fully managed analytical database for OLAP workloads. This guide walks through the three-stage setup: create the instance, create a database account, then connect.
Prerequisites
Before you begin, make sure you have:
An Alibaba Cloud account. If using a RAM user, attach the AliyunRDSFullAccess and AliyunBSSOrderAccess policies. See Authorize RAM resources.
Decided which region to deploy in. Region cannot be changed after instance creation.
An existing Virtual Private Cloud (VPC) and vSwitch in the target region, or permission to create them.
Create a DuckDB-based analytical primary instance
Go to the ApsaraDB RDS instance creation page.
Select a Billing Method:
Method Best for Pay-as-you-go Short-term use or evaluation. Release the instance at any time to stop billing. Subscription Long-term use. More cost-effective than pay-as-you-go. Supports auto-renewal. Select a Region.
ImportantRegion cannot be changed after the instance is created. To communicate with an Elastic Compute Service (ECS) instance over an internal network, select the same region. To connect from a local server or computer, select a region geographically close to the device.
Configure the database engine and storage: (Optional) Enable disk encryption.
Set Database Engine to MySQL_DuckDB, version 8.0.
Set Edition to Cluster Edition. This is the only supported edition.
Set Product Type to Standard. This is the only supported type.
Set Storage Type to Premium ESSD. This is the only supported storage type.
Configure the network. Network Type is automatically set to VPC and cannot be changed.
Select a VPC. VPC cannot be changed after the instance is created. To connect from an ECS instance over an internal network, select the same VPC as the ECS instance.
Specify whether to add the VPC CIDR block to the Whitelist. Adding it during creation avoids manually configuring an IP address whitelist after creation.
Configure zones, vSwitches, secondary nodes, and deployment method:
Zone and vSwitch: A zone is an independent physical area within a region. A vSwitch is a basic network device within a VPC that connects different cloud resources; you must specify a vSwitch when creating a resource in a VPC. Select a vSwitch within the chosen zone, or click Create vSwitch. For vSwitch parameter details, see Create and manage a vSwitch.
Secondary nodes: Configure at least one secondary node to ensure high availability. Set 1 or 2 secondary nodes at creation. You can add nodes later, up to a maximum of 8 secondary nodes.
Deployment method:
Method Description Multi-zone deployment (Recommended) Primary and secondary nodes span different zones in the same region. Provides cross-zone disaster recovery. Requires configuring Primary Zone and Network and Secondary Zone and Network. Single-zone deployment Primary and secondary nodes are in the same zone.
Select an Instance Type:
Set Category to Dedicated. Only Dedicated instance types (with dedicated CPU, memory, storage, and I/O resources) are supported.
Select the specific type based on CPU cores and memory. For the full list, see DuckDB-based analytical primary instance types.
ImportantFor Cluster Edition instances, the reference price shown in the Instance Type section is the price per node. A cluster with one primary node and two secondary nodes costs three times the reference price. Hover over Configure Fee next to View Details in the lower-right corner to see the total.
Select a Storage Capacity between 20 GB and 128,000 GB in increments of 5 GB.
Enable Automatic Storage Expansion to prevent the instance from being locked due to insufficient storage. When triggered, the system expands storage by 5 GB or 15% of the current capacity, whichever is larger.
(Optional) Configure additional parameters. Use the default values unless you have specific requirements.
Parameter Description Database Port Port for the instance. Value range: 1000–65534. Default Storage Engine Only DuckDB is supported. Time Zone Time zone for the instance. Table Name Case Sensitivity Default: Case-insensitive. Select Case-sensitive if migrating from a case-sensitive local database. Release Protection Prevents accidental release of pay-as-you-go instances. See Enable or disable instance release protection. Minor Engine Version Update Policy Auto Upgrade (Recommended): automatically upgrades within the maintenance window; you can change the upgrade time on the Scheduled Events page. Manual Upgrade: upgrade manually from the Basic Information page. To pin a specific version, select Select Minor Engine Version. Resource Group Assign the instance to a default or custom resource group. Instance Name A description to identify the instance. Tags Attach tags to classify and filter instances. See Filter instances by tag. Privileged Account Select Configure Now to set the account and password, or Configure Later. See Create a privileged account. Review the order, set the quantity and subscription duration (subscription instances only), then click Confirm Order and complete the payment.
For subscription instances, select Enable Auto-renewal to avoid service interruptions from an expired instance. The auto-renewal cycle matches the purchase period: one month for monthly purchases, one year for annual purchases.
Go to the Instances page. Select the region in the top navigation bar and find the new instance by Creation Time.
Instance creation takes 1–10 minutes. Refresh the page to check the status.
Create a database account
Before connecting to the instance, create a database account. See Create a database account.
Connect to the instance
Get the connection endpoint
Go to the ApsaraDB RDS Instances page, select the region, and click the instance ID.
On the Basic Information page, find Network Type and click View Connection Details. Copy the internal or public endpoint.
Choose a connection method
A DuckDB-based analytical primary instance uses the same connection protocol as ApsaraDB RDS for MySQL. Choose a method based on your environment:
| Method | Best for |
|---|---|
| CLI or database client | Local development, scripting, or any MySQL-compatible client |
| DMS (Data Management Service) | Browser-based access without installing a local client |
| Application code | Integrating the instance into your application |
Use the internal endpoint when connecting from resources in the same VPC. Use the public endpoint for connections from outside Alibaba Cloud, such as a local machine.