v.20.1Improvement

Support MySQL Database Commands: DROP DATABASE, DETACH TABLE, DROP TABLE, ATTACH TABLE

Support DROP DATABASE, DETACH TABLE, DROP TABLE and ATTACH TABLE for MySQL database engine. #8202 (Winter Zhang)
Added support for DROP DATABASE, DETACH TABLE, DROP TABLE, and ATTACH TABLE operations on the MySQL database engine in ClickHouse.

Why it matters

This feature enables users to manage MySQL database objects more effectively directly from ClickHouse by allowing common DDL operations such as dropping and attaching tables, and dropping databases. It improves synchronization and control when working with MySQL engines in ClickHouse, facilitating easier database and table lifecycle management.

How to use it

Users can now execute the following SQL commands on MySQL engine databases and tables in ClickHouse:

DROP DATABASE <database_name>;
DETACH TABLE <table_name>;
DROP TABLE <table_name>;
ATTACH TABLE <table_name>;

These commands will work similarly to other ClickHouse engines, allowing full lifecycle management of MySQL engine tables and databases.