Quantcast
Channel: WampServer - WampServer English
Viewing all articles
Browse latest Browse all 3177

SQLSTATE[HY000] [1049] Unknown database 'dbname' (no replies)

$
0
0
Although I have a database, I get the following error.


SQLSTATE[HY000] [1049] Unknown database 'hascodin_site'



php connection code

>

$baglanti = "mysql:host=localhost;dbname=hascodin_site";
$mysqluser = "root";
$mysqlpass = "";

try{
$baglan = new PDO($GLOBALS["baglanti"],$GLOBALS["mysqluser"],$GLOBALS["mysqlpass"]);
$baglan->query("SET CHARACTER SET 'utf8'");
$baglan->query("SET NAMES 'utf8'");
}catch(PDOException $e){
print $e->getMessage();
}




<

Viewing all articles
Browse latest Browse all 3177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>