0

I have php 7.1 installed, with nginx1.95 and phpMyAdmin on my ec2, but when I've uploaded files to ec2 and tried to connect to mySQL database on RDS I got this error.

I've searched error code HY000 and 1045 but no answers work for me.

Warning: mysqli_real_connect(): (HY000/1045): Access denied for user
'XXX'@'XXX.XXX.XXX.XXX' (using password: YES) in
/data/wwwroot/www.xxx.com/wp-includes/wp-db.php on line 1529

The IP address showed above is my EC2 private IP address, I've set endpoint in the config file of phpMyAdmin and it worked great. User and Database already exist in RDS MySQL.

It may be caused by the upgrade of php, I used php7 before, and now upgrade to php7.1.

Apparently it is using the 'localhost' instead of the RDS endpoint but still can not figure out why the error showed a file in my wordpress.

Oh, even though I don't think it a problem with wordpress, the code in line 1529 is also listed if it helps.

mysqli_real_connect( $this->dbh, $host, $this->dbuser, 
$this->dbpassword, null, $port, $socket, $client_flags );

I am not using localhost but remote RDS MySQL, other questions related was different.

Athen Ai
  • 11
  • 3

0 Answers0