Connection failed: SQLSTATE[HY000] [1045] Access denied for user ' epiz_23894516'@'192.168.2.194' (using password: YES)

i read

https://infinityfree.net/support/common-mysql-errors/
but i still cant solve the problem, im not using the client area password, i’m using the hosting account password
image <<< this one right
but still i got this problem, i watch the tutorial on youtube, read through the forum but still the problem is there
i need help thank you

Here is my configuration

public function connect () {
$this->servername = “sql109.epizy.com”;
$this->username = “epiz_2384”;
$this->password = “hosting password”;
$this->dbname = “epiz_23894516_db name”;

    $this->charset = 'utf8mb4';
    var_dump("<br>".$this->servername."<br>".
    $this->username."<br>".
    $this->password."<br>".
    $this->dbname."<br>".
    $this->charset."<br>");
    try {

        //dsn = data source name
        $dsn = "mysql:host=". $this->servername. ";dbname=" . $this->dbname. ";charset=" . $this->charset;
        $pdo = new PDO ($dsn, $this->username, $this->password);

        $pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);

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

}

ok fine, i removed the current hosting account then i create a new one, but i let the autogenerated username and password as default it work well, hopefully it is useful for you, another tips, i type all the value manually, i didnt copy the password and username

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