AnalyticDB for MySQL Data Lakehouse Edition (V3.0) and Data Warehouse Edition (V3.0) allow you to execute the CREATE EXTERNAL DATABASE statement to create an external database.

Usage notes

  • You cannot create external databases by using the CREATE EXTERNAL DATABASE statement for Data Lakehouse Edition (V3.0) clusters that run the Spark engine.
  • Only external tables can be created in external databases. For more information about how to create an external table, see CREATE EXTERNAL TABLE.

Syntax

CREATE EXTERNAL DATABASE [IF NOT EXISTS] <db_name>

Parameters

db_name: The name of the external database. For more information about the naming conventions for external databases, see Naming constraints.

Examples

CREATE EXTERNAL DATABASE adb_demo;