Connecting to remote LightSail database but is looking for localhost database

Keywords: WordPress - AWS - Technical issue - Services (Apache, MariaDB, MySQL…)

bnsupport ID: 1e472f09-f147-099a-328e-a4bf5c0a494a

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/

bndiagnostic failure reason: Did not find the issue I am experiencing…!

Description:
I am trying to connect to my LightSail database but am hitting this error:

Warning: mysqli_real_connect(): (HY000/1045): Access denied for user ‘dbmasteruser’@‘172.26.7.37’ (using password: YES) in /opt/bitnami/wordpress/wp-includes/wp-db.php on line 1653

I have done a test and was able to connect to the database from remote with these credentials. What I don’t understand is why its looking at ‘172.26.7.37’ and not at the DB_HOST set in the config which points at the LightSail database endpoint.

Thanks for any suggestions

Hello @llewellynbh,

Thanks for using our WP stack! Your error is a bit strange, could you make sure you added the whole hostname in wp-config.php and used the correct password for DB_PASSWORD? Also, could you try using single quotes ' for your param values instead of the double quotes " before trying again?

Regards,
Francisco de Paz

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