[root@host]# mysqladmin -u root -p drop yiibai 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 'yiibai' database [y/N] y Database "yiibai" dropped 或使用: mysql> drop database yiibai; Query OK, 0 rows affected (0.01 sec) 使用下面命令看删除后,数据库的列表情况: mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | | yiibai | +--------------------+ 6 rows in set (0.00 sec) 2、使用PHP脚本删除数据库PHP使用mysql_query()函数来创建或删除MySQL数据库。该函数有两个参数,成功返回TRUE或失败返回FALSE。语法: bool mysql_query( sql, connection );