PHP 可連接 MYSQL ,但無法建立資料庫,HELP ME !

edited 十月 2013 in 資料庫
PHP 可連接 MYSQL ,但無法建立資料庫

<?php
$username = "root";
$password = "1234";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
print "Connected to MySQL<br>";
?>


得到 Connected to MySQL



<?php
$username = "root";
$password = "1234";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
print "Connected to MySQL<br>";


mysql_create_db("store"); //加入這行
mysql_select_db("store"); //加入這行
?>

我去 phpmyadmin 看

並沒有建立 store

我的 phpmyadmin 運作正常,MYSQL 也運作正常,的可建立 database and table

Help me PLS

thanks !

原始討論: http://twpug.net/x/modules/newbb/viewtopic.php?topic_id=4166

評論

Sign In or Register to comment.