如何使用 mysqladmin 刪除現有的資料庫?
我們需要特殊的許可權來建立或刪除 MySQL 資料庫。以下是使用 mysqladmin 二進位制程式刪除資料庫的語法:-
語法
[root@host]# mysqladmin -u root -p drop db_name Enter password:******
此處,db_name 是我們要刪除的資料庫的名稱。
示例
以下是刪除名為 TUTORIALS 資料庫的示例:-
[root@host]# mysqladmin -u root -p drop TUTORIALS Enter password:******
上述語句會給你一個警告,並確認你是否真的要刪除此資料庫。
Dropping the database is potentially a very bad thing to do. Any data stored in the database will be destroyed. Do you really want to drop the 'TUTORIALS' database [y/N] y Database "TUTORIALS" dropped
廣告