aws-samples / eb-php-wordpress

Configuration files and instructions for installing WordPress securely and running it in a load balanced AWS Elastic Beanstalk environment with an EFS file system for shared assets.
Apache License 2.0
165 stars 95 forks source link

cannot connect to database if RDS is external #4

Closed babatundebusari closed 7 years ago

babatundebusari commented 7 years ago

I decided to use an external RDS instance instead of allowing EBS to create one for me I get this error

Error establishing a database connection

But when i logged inside the instance and ran command to connect to the database, it connected perfectly

I also checked the software configuration settings to see it the settings i made via eb setenv ... worked and all the values for host, name, user and password are all correct.

What could be the issue?

mwunderl commented 7 years ago

Hi babatun,

We've recently added a tutorial to the developer guide that uses an external RDS instance- http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-hawordpress-tutorial.html Check your configuration against the steps in the tutorial.

Try removing the wp-config.php file from your source code and redeploy. When you install, WordPress will prompt you enter the connection information instead of reading it from the environment. See if that works.

Thanks, -Michael

babatundebusari commented 7 years ago

@mwunderl cool will check it out BUT any plan on a multi-docker that uses EFS? Like converting this tutorial/project to use docker?

Will be REALLY great to see Thanks

mwunderl commented 7 years ago

I'm not planning to build one right now but if someone builds it out I'll gladly add it to the repo. -Michael