时间:2021-07-01 10:21:17 帮助过:19人阅读
语法:DROP DATABASE 数据库名;
mysqladmin -u root -p drop bird
语法:mysqli_query(connection,query,resultmode);
<?php
header("content-type:text/html;charset=utf-8");
$dbhost = ‘localhost‘;
$dbuser = ‘root‘;
$dbpass= ‘root‘;
$conn=mysqli_connect($dbhost,$dbuser,$dbpass);
if(!$conn)
{
die(‘连接失败‘.mysqli_error($conn));
}
echo "连接成功<br/>";
$sql=‘DROP DATABASE bird‘;
$retval = mysqli_query($conn,$sql);
if ($retval)
{
die(‘删除数据库失败‘.mysaqli_error($conn);
}
echo "数据库 bird 删除成功";
mysqli_close($conn);
?>
MySQL——删除数据库
标签:数据库 close store user pre base html com val