[英]Can't connect to a database on Amazon RDS from Amazon EC2 ubuntu 16.04 image
I have hosted a play framework
web application on Amazon EC2 instance. 我已经在Amazon EC2实例上托管了一个
play framework
Web应用程序。 The application is not able to connect to a mysql database
located on the Amazon RDS instance. 该应用程序无法连接到位于Amazon RDS实例上的
mysql database
。 When I run the play framework web application on my local computer it successfully connects to the database on the Amazon RDS instance. 当我在本地计算机上运行play framework Web应用程序时,它成功连接到Amazon RDS实例上的数据库。 I checked the database connection credentials in the production conf file many times.
我多次检查了生产conf文件中的数据库连接凭据。 Looks correct.
看起来正确。
When I do 当我做
mysql -h********.rds.amazonaws.com -p****** -u****** db_name
from the local computer it quickly connects. 从本地计算机快速连接。 But when I try same connection to RDS from EC2 it throws:
但是,当我尝试从EC2到RDS的相同连接时,它会抛出:
ERROR 2003 (HY000): Can't connect to MySQL server on ********.rds.amazonaws.com
Can anyone kindly help me with this or suggest anything that I may be possibly missing. 任何人都可以帮我这个忙,或者提出任何我可能会想不到的建议。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.