Delete a database
To delete a database, you can use the DROP DATABASE statement. The format of the statement is as follows:
DROP database db_name;
The operation of deleting a database should be used with caution. Once this operation is performed, all structures and data of the database will be deleted. Deleted, there is no possibility of recovery unless the database is backed up.
Example:
Delete the database named shili through the drop database statement. The code is as follows:
mysql> drop database shili ;
Query OK, 0 rows affected (0.00 sec)
mysql> show databases ;
+------ ---------------+
| Database |
+--------------------------+
| information_schema |
| mysql |
+--------------------+
2 rows in set (0.00 sec)
After deleting the database, there will be only two databases in the MySQL server.
The above is the mysql tutorial: MySQL deletes the contents of the database. For more related articles, please pay attention to the PHP Chinese website (www.php.cn)!