Running Amazon Linux 2, installed Apache, PHP, PHP-MySQL, and WordPress. This AMI is using an AWS security group called WebDMZ, say.
Created a MySQL DB in Amazon RDS which also uses AWS security group WebDMZ, I copied db_name
, db_user
, db_pass
, db_hostname
to /var/www/html/wp-config.php
.
@ www.example.com/wp-admin/install.php
I receive:
Error establishing a database connection. Connection timed out
If both Amazon Linux 2 & MySQL are in the same security group, shouldn't they be able to communicate with each other?
Help appreciated.
Edit, I found if I added an Inbound rule to allow MySQL connections from anywhere, the install proceeded, but doubt this is a safe way to go?