Database access denied

Website URL

Error Message

Connection failed: SQLSTATE[HY000] [1044] Access denied for user ‘epiz_33752893’@‘192.168.0.%’ to database ‘epiz_32752893_db1’

Other Information

I have seen someone mentioned php configuration, but I don’t know how and where to set it.

You’ll need to find where in your code the connection is being form, and by having a quick look in without any knowledge of your code, I think it’s entirely possible it’s done in the file you linked (conn.php).


I tried different codes indifferent styles, but none of them was able to access the database.

$servername = "";
$username = "epiz_33752893";
$password = // password
$database = "epiz_32752893_db1";

try {
  $conn = new PDO("mysql:host=$servername;dbname=$database", $username, $password);

  echo "Connected successfully";
  } catch(PDOException $e) {
  echo "Connection failed: " . $e->getMessage();

// Close connection
$conn = null;

check if the DB with that name exists ! (epiz_32752893_db1)

if you get 1044 then the DB name is the problem
if you get 1045 then the password is a problem


You are right.
There is a wrong digit in the username part of the database name. Stupid me.

Thanks to you two!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.