All Products
Search
Document Center

ApsaraDB for ClickHouse:Create a database

Last Updated:Jun 10, 2026

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:

Procedure

  1. Log in to the DMS console, connect to your database, and open the SQL Console page.

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

      Note

      The database name cannot be system because system is a built-in database.

    • Example:

      create database if not exists clickhouse_demo ON CLUSTER default; 
  3. In the upper-left corner, click Execute to create the database.

Next steps

Create a table