I have hosted a website on Strato server. If I want to establish a connection to my MySQL database I get this message: Access denied for user 'user'@'host' to database 'Dbname'
. This considers a remote access. I also can't execute simple query in the PHPMyAdmin environment.
select Host, User from mysql.user;
The result of this command is an error:
SELECT command denied to user 'U*******'@'klute.store.d0m.de' for table 'user
'
function __construct()
{
$user = 'U*******';
$pass = '';
$database = 'DB*******';
$host = 'rdbms.strato.de';
$this->db = new mysqli( $host, $user, $pass, $database);
if( $this->db->connect_errno > 0 )
die( $this->db->connect_error );
}
There must be a way because I already have establishment a connection with Wordpress. So they know how it's done.
mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );