All Products
Search
Document Center

ApsaraDB for ClickHouse:Create a database

Last Updated:Sep 01, 2025

You must create a database before you can write and query data. This topic describes how to create a database using Data Management Service (DMS).

Limits

You can create up to 256 databases in each ApsaraDB for ClickHouse cluster.

Prerequisites

You have completed the following steps in the Quick Start guide.

Procedure

  1. Log on to the DMS console and go to the SQL Console page.

  2. Enter the CREATE DATABASE statement.

    • Syntax:

      CREATE DATABASE [IF NOT EXISTS] db_name [ON CLUSTER default];
    • Parameters:

      db_name: The name of the database. The name must start with a lowercase letter and can be up to 64 characters in length. It can contain letters, digits, and underscores (_). The name cannot contain consecutive underscores (_).

      Note

      Do not use system as the database name because it is the name of the built-in database.

    • Example:

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

What to do next

Create a table