MySqli Database connection access denied php -
hey i'm connecting db in php would, info there , correct. checked password few times. there here ruin connection? here's (nice , vague) error message:
connection failed: access denied user 'user'@'localhost' database 'db'
<?php header('access-control-allow-origin: *'); ?> <style> </style> <html> <body> <?php $servername = "localhost"; $username = "user"; $password = "password"; $dbname = "db"; // create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // check connection if (!$conn) { die("connection failed: " . mysqli_connect_error()); }
connection failed: access denied user 'user'@'localhost' database 'db'
nope thats not vague, accurate can get. user user not have permission access database db on localhost if password correct. no if else or guesses or chances of being incorrect in thinking so.
look @ database permissions db
Comments
Post a Comment