Before you write data or run queries, create a database by using Data Management Service (DMS).
Limits
Each ApsaraDB for ClickHouse cluster supports up to 256 databases.
Prerequisites
Complete the following steps in the Quick Start guide:
-
Configure an IP address whitelist
NoteWhen you create an ApsaraDB for ClickHouse cluster, the system automatically adds a whitelist group named ali_dms_group with DMS server IP addresses. If this fails, manually add the regional IP addresses listed in the DMS IP address list.
Procedure
-
Log in to the DMS console, connect to your database, and open the SQL Console page.
-
Enter a CREATE DATABASE statement.
-
Syntax:
CREATE DATABASE [IF NOT EXISTS] db_name [ON CLUSTER default]; -
Parameters:
db_name: The database name. Must start with a lowercase letter, contain only letters, digits, and underscores (_), and be 64 characters or fewer. Consecutive underscores are not allowed.NoteThe database name cannot be
systembecausesystemis a built-in database. -
Example:
create database if not exists clickhouse_demo ON CLUSTER default;
-
-
In the upper-left corner, click Execute to create the database.