[英]Unable to connect aws RDS to django local
I am trying to connect my local django application to amazon RDS (tried with both MySQL and PostgreSQL) but I am not able to connect as it shows the following errors, Currently seeking answer for PostgreSQL.我正在尝试将我的本地 django 应用程序连接到亚马逊 RDS(尝试使用 MySQL 和 PostgreSQL)但我无法连接,因为它显示以下错误,目前正在寻找 PostgreSQL 的答案。
In my Settings.py :在我的Settings.py中:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'database_name',
'USERNAME': 'my_username',
'PASSWORD': 'my_password',
'HOST': 'database-abc.xxx.us-region-yyy.rds.amazonaws.com',
'PORT': '5432',
}
}
In AWS database configuration:在 AWS 数据库配置中:
I get this error:我收到此错误:
django.db.utils.OperationalError: could not connect to server: Connection timed out (0x0000274C/10060)
django.db.utils.OperationalError:无法连接到服务器:连接超时(0x0000274C/10060)
Is the server running on host "database-abc.xxx.us-region-yyy.rds.amazonaws.com" (69.420.00.121) and accepting TCP/IP connections on port 5432?服务器是否在主机“database-abc.xxx.us-region-yyy.rds.amazonaws.com”(69.420.00.121) 上运行并在端口 5432 上接受 TCP/IP 连接?
I referred to all the available data but still am unable to resolve this issue!我参考了所有可用的数据,但仍然无法解决这个问题!
Thanks in advance!提前致谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.