This topic describes how to drop a database in MySQL mode by using an SQL statement.
Prerequisites
Ensure that you have the DROP privilege. For information about how to view your privileges, see View user privileges. To acquire the DROP privilege, contact the administrator. For more information about how to grant privileges to a user, see Modify user privileges.
Procedure
Log on to the MySQL tenant of the cluster.
Use the
DROP DATABASEstatement to drop a database.Example:
obclient> DROP DATABASE my_db;
What to do next
If the recycle bin feature is enabled, a database dropped by mistake can be restored from the recycle bin. For more information, see Restore objects from the recycle bin.
More information
For more information about the syntax of the DROP DATABASE statement, see DROP DATABASE.