Syntax\n------\n\nDROP {DATABASE | SCHEMA} [IF EXISTS] db_name\n\nDescription\n-----------\n\nDROP DATABASE drops all tables in the database and deletes the database. Be very careful with this statement! To use DROP DATABASE, you need the DROP privilege on the database. DROP SCHEMA is a synonym for DROP DATABASE.\n\nImportant: When a database is dropped, user privileges on the database are not automatically dropped. See GRANT.\n\nIF EXISTS\n\nUse IF EXISTS to prevent an error from occurring for databases that do not exist. A NOTE is generated for each non-existent database when using IF EXISTS. See SHOW WARNINGS.\n\nAtomic DDL\n\nMariaDB 10.6.1 supports Atomic DDL.DROP DATABASE is implemented as\n\n``sql\nLOOP OVER ALL tables\n  DROP TABLE tbl\n`\n\nEach individual DROP TABLE is atomic while DROP DATABASE as a whole is crash-safe.\n\nAtomic DROP` is not available.\n\nExamples\n--------\n\nDROP DATABASE bufg;\nQuery OK, 0 rows affected (0.39 sec)\n\nDROP DATABASE bufg;\nERROR 1008 (HY000): Can't drop database 'bufg'; database doesn't exist\n\n \\W\nSHOW warnings enabled.\n\nDROP DATABASE IF EXISTS bufg;\nQuery OK, 0 rows affected, 1 warning (0.00 sec)\nNote (Code 1008): Can't DROP DATABASE 'bufg'; DATABASE doesn't exist\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/data-definition/drop/drop-database