Whenver i go to locallhost/Blog/app/DB i encounter this error. I have tried so many times to connect to the database but could not connect. Even if i use my mysql password which is "root" this does not work.Please someone help me Here is my connection code:
host = "localhost";
$username = "root";
$password ="";
$db_name ="blog";
$conn = new mysqli($host, $username, $password, $db_name);
if($conn->connect_error){
die(' Database connection error '.$conn->connect_error);
}

127.0.0.1,::1andlocalhost? It seems odd to have different credentials for those since they are all local addresses. Could be worth a try? Or even just try with127.0.0.1instead. (And don't forget to flush privileges if you do any changes to the users)