i have a connection problem with php in a web server with apache2 and a mariadb database in a VPS.
In the database exist 3 security group:
(All with port range: 3306, 80)
With this security groups the connection between WebServer - Database is okey. For security i want that access to the database be only for Home and MyVps.
But when i tryng delete "AllTraffic" security group, the connection of my WebServer in the VPS to the database is lost. The connection of my local WebServer to database is okey.
I think that the problem is in the security group "MyVps". At present, the ip is a elastic ip, the same that i use to access to WebServer from the browser.
Is your RDS instance, and/or EC2 instance in a VPC? If so the connection to your RDS from the EC2 instance could be over the private IP address, not the public Elastic IP.
Instead of granting access to the Elastic IP I would probably grant access to the security group your EC2 instance uses instead.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.