使用普通用戶登陸mysql服務(wù)器,你可能需要特定的權(quán)限來創(chuàng)建或者刪除 MySQL 數(shù)據(jù)庫。
所以我們這邊使用root用戶登錄,root用戶擁有最高權(quán)限,可以使用 mysql mysqladmin 命令來創(chuàng)建數(shù)據(jù)庫。
在刪除數(shù)據(jù)庫過程中,務(wù)必要十分謹慎,因為在執(zhí)行刪除命令后,所有數(shù)據(jù)將會消失。
以下實例刪除數(shù)據(jù)庫TUTORIALS(該數(shù)據(jù)庫在前一章節(jié)已創(chuàng)建):
[root@host]# mysqladmin -u root -p drop TUTORIALS Enter password:******
執(zhí)行以上刪除數(shù)據(jù)庫命令后,會出現(xiàn)一個提示框,來確認是否真的刪除數(shù)據(jù)庫:
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
![]() | ![]() .. 定價:¥45 優(yōu)惠價:¥42 更多書籍 |
![]() | ![]() .. 定價:¥225 優(yōu)惠價:¥213 更多書籍 |