Quick Start overview
AnalyticDB for MySQL is a petabyte-scale real-time data warehouse that provides high concurrency and low latency. It is fully compatible with the MySQL protocol and the SQL 2003 standard. You can use it to perform real-time multidimensional analysis and business intelligence queries on trillions of rows of data in milliseconds.
Prerequisites
To get started, register for an Alibaba Cloud account.
If you purchase an AnalyticDB for MySQL cluster with the pay-as-you-go billing method, make sure that your Alibaba Cloud account balance is at least 100 CNY.
Procedure overview
The basic procedure for using AnalyticDB for MySQL includes the following steps:
Purchase an AnalyticDB for MySQL 2.0 service
Log on to the AnalyticDB console with your Alibaba Cloud account to purchase an AnalyticDB for MySQL service.
Select a region and zone
You can purchase AnalyticDB for MySQL resources in any region where the AnalyticDB for MySQL service is available. To improve access speed, select the region that is closest to your business. The service is available in the following regions:
In the Chinese mainland and Hong Kong (China), the available regions are North China (Beijing, Zhangjiakou), East China (Shanghai, Hangzhou), South China (Shenzhen), and Hong Kong (China).
Outside the Chinese mainland, the available regions are Singapore and US (Silicon Valley).
A zone is a physical area within a region, such as China (Hangzhou), with an independent power supply and network. Zones within the same region are interconnected over a private network. Network latency is lower for resources within the same zone.
Select an ECU type
An elastic compute unit (ECU) is a basic unit used to measure the computing power of an AnalyticDB for MySQL database. ECUs are available in two types: High-Performance and Large-Storage.
High-Performance: ECUs with names that start with C or H are used for high-performance clusters. All data is stored on SSDs. This type is suitable for business scenarios that require high performance and high query concurrency.
Large-Storage: ECUs with names that start with S are used for large-storage clusters. These clusters use a tiered storage architecture with SSDs and HDDs. Hot data is stored on SSDs, and cold data is stored on HDDs. This type is suitable for business scenarios with lower concurrency and less-demanding performance requirements, and can tolerate a query response time of more than 10 seconds.
NoteAnalyticDB for MySQL lets you change ECU configurations only between ECUs of the same type. For example, you can upgrade, downgrade, scale out, or scale in between C4 and C8, or between S2N and S8N.
AnalyticDB for MySQL does not support conversion between the two ECU types. Therefore, select an ECU type carefully based on your business needs.
Select the number of ECUs
An AnalyticDB for MySQL cluster requires at least two ECUs, and the number of ECUs must be an even number. Select a number of ECUs that is appropriate for your business.
AnalyticDB for MySQL supports online scale-out and scale-in, which means you can change the number of ECUs without interrupting your services. For more information, see Change ECU Configuration.
Specify the database name
The database name is the unique identifier of an AnalyticDB for MySQL cluster and must be globally unique. If the name is already in use, an error message is displayed and you cannot create the AnalyticDB for MySQL cluster.
The database name must start with a lowercase letter and can contain letters, digits, and underscores (_). It cannot contain two or more consecutive underscores. The name can be up to 64 characters long.
Select a subscription duration (for subscription clusters)
When you purchase a subscription AnalyticDB for MySQL cluster, you must specify a subscription duration. The longer the duration, the greater the discount.
NoteYou can enable auto-renewal during purchase to prevent service interruptions when your subscription expires.
Use the AnalyticDB for MySQL 2.0 service
AnalyticDB for MySQL is fully compatible with the MySQL protocol and SQL 2003. After you purchase AnalyticDB for MySQL, you can use AnalyticDB for MySQL in the same way you use a MySQL database.
Create a table group
A table group is a collection of data tables that can be associated with each other. AnalyticDB for MySQL introduces the concept of table groups to manage associated data tables. For more information about how to create a table group, see Create a table group.
Create a table
Tables in AnalyticDB for MySQL are classified into dimension tables and standard tables. For more information about the table types, see Basic Concepts. To create a table, see Create a table.
Create a VPC
AnalyticDB for MySQL supports two network types: classic network and virtual private cloud (VPC). By default, an AnalyticDB for MySQL cluster is created in a classic network. You can also create a VPC for the AnalyticDB for MySQL cluster. For more information, see Network types.
A VPC is a logically isolated private network. You can customize the network topology and IP addresses, and connect to it using a leased line. Compared to the classic network, a VPC provides higher security and flexibility.
Connect to AnalyticDB for MySQL
You can connect to AnalyticDB for MySQL using the AnalyticDB console. The console provides a built-in DMS client, which is convenient for users who prefer a graphical user interface.
During application development, you can also connect to AnalyticDB for MySQL using code or other clients. For more information, see Connect to AnalyticDB for MySQL.
Import data into AnalyticDB for MySQL
AnalyticDB for MySQL supports multiple data import methods. You can use Alibaba Cloud Data Transmission Service (DTS) to import data from MySQL or PolarDB-X (formerly DRDS) into AnalyticDB for MySQL. The MySQL database can be an ApsaraDB RDS for MySQL instance, a self-managed MySQL database that is hosted by another cloud service provider or in an on-premises data center, or a self-managed MySQL database on an ECS instance. For more information, see Use DTS to synchronize data from MySQL.
For more information about data import methods, see Synchronize data.
Add, delete, and update data in AnalyticDB for MySQL
Add data: After you INSERT data into a streaming table, the data is available for queries after 5 to 10 seconds. If you require real-time data visibility, contact technical support.
Delete data: AnalyticDB for MySQL supports deleting data from standard tables using the DELETE statement.
Update data: AnalyticDB for MySQL does not support the UPDATE operation. You can update data using an INSERT statement to overwrite data based on the primary key.
Shut down the AnalyticDB for MySQL 2.0 service
You can shut down the AnalyticDB for MySQL service at any time. For more information, see Shut down the AnalyticDB for MySQL service.