Deletes a database from an AnalyticDB for MySQL cluster.
Syntax
DROP DATABASE db_name [CASCADE]Parameters
| Parameter | Description |
|---|---|
db_name | The name of the database to delete. |
CASCADE | Drops the database and all objects it contains, including tables, views, and materialized views. Without CASCADE, all tables, views, and materialized views must be deleted from the database before you can drop it. |
Usage notes
Important
Only clusters running V3.2.1 or later support the CASCADE keyword. On earlier clusters, delete all tables, views, and materialized views from the database before running DROP DATABASE.
To check your cluster version or upgrade to V3.2.1 or later, see Update the minor version of a cluster.
Examples
Drop the adb_demo database (the database must contain no tables, views, or materialized views):
DROP DATABASE adb_demo;Drop the adb_demo1 database and all objects it contains:
DROP DATABASE adb_demo1 CASCADE;