AWS RDS数据库显示超时错误 [英] AWS RDS Database show timeout error

查看:290
本文介绍了AWS RDS数据库显示超时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从EC2实例访问RDS时,该时间显示超时错误

When accessing RDS from an EC2 instance that time show me timeout error

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] Connection timed out in

我尝试指定EC2实例的IP地址并指定RDS实例的内部IP,但是错误相同.

i have try to specifying the IP address of the EC2 instance and specify the internal IP of the RDS instance but error is same.

推荐答案

最可能的原因是您的RDS安全组未配置为允许传入流量.

The most probable reason is that your RDS Security Groups are not configured to allow incoming traffic.

您需要更改这些安全组并允许入站流量.

You need to change those security groups and allow inbound traffic.

建议将入站流量的源IP限制为您要从中命中RDS的EC2实例的内部IP,或仅限于在其中创建EC2实例的VPC/子网的CIDR块.

Would recommend that inbound traffic's source IP's be limited to internal IP's of the EC2 instances from which you are hitting the RDS or for the CIDR block of the VPC/Subnet in which your EC2 instances are created.

这篇关于AWS RDS数据库显示超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆