ProxySQL Error: Access denied for user

Hi, I am geting this error message when i try to conncect database.

error message:SQLSTATE[HY000] [1045] ProxySQL Error: Access denied for user ‘id6769402_teoricenter’@‘2a02:4780:bad:f00d::f’ (using password: YES)

class Db_connection{
## this is for
public $host= ‘localhost’;
public $database= ‘id*******_korkort’;
public $user= ‘id*******_teoricenter’;
public $pass= ‘teoricenter****’;

public function connection(){

try{
    
  $db = new PDO("mysql:host=$this->host; dbname=$this->database; charset=utf8;" ,$this->user, $this->pass);
    
    $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
    $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, FALSE);
    $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); 
    echo "Connected successfully"; 
    return $db;
     
    
}catch(PDOException  $e){
    echo "Connection failed: ";
    echo'<div class="alert alert-error">
            <button type="button" class="close" data-dismiss="alert">x</button>
            <strong>error message:'.$e->getMessage().'</strong> 
        </div>';


    }     
}

}
this is my code, and i dont think there is a something wrong with that. With those username and password I can access to database and see my tables.

Did I miss something somewhere? is that something to do with privilegier? I am using free account and my own domain.

using Current version: PHP 7.0

Hi, it appears there is a server down that hasn’t been attended to. I’m alerting our developers, and hopefully they’ll take care of this. I’m sorry it took so long for someone to discover this issue, our volunteer support staff is currently stretched thin. If this issue persists after the downed server is functional, let me know.

1 Like

I still can’t access to database.

Hi, the issue from last night seems to have been resolved. Can you try using a different PHP version?