【问题标题】:Django app on Elastic Beanstalk can't connect to RDSElastic Beanstalk 上的 Django 应用程序无法连接到 RDS
【发布时间】:2015-05-07 05:37:36
【问题描述】:

我有一个在 Elastic Beanstalk 上运行的 Django 应用程序抛出以下错误:

[:error] [pid 12271] (2003, "Can't connect to MySQL server on 'xxxxxxxx.xxxxxxxxxxx.us-east-1.rds.amazonaws.com' (110)")

我通过 ssh 连接到 EB 服务器然后连接到 MySql 没有问题:

mysql -uadmin -p -hxxxxxxxx.xxxxxxxxxxx.us-east-1.rds.amazonaws.com

所以我已经排除了防火墙问题或我的 VPC 的问题。我还尝试对 settings.py 文件中的凭据进行硬编码,以排除 ENV 变量的问题。我对 Django 了解不多,因此不胜感激。

【问题讨论】:

    标签: mysql django python-2.7 amazon-web-services rds


    【解决方案1】:

    我的 .ebextensions 缺少一些包,我补充说:

    packages:
      yum:
        gcc: []
        mysql: []
        mysql-devel: []
        python-devel: []
    

    【讨论】:

      猜你喜欢
      • 2016-08-24
      • 2014-03-06
      • 2016-01-09
      • 2021-02-14
      • 2017-03-05
      • 1970-01-01
      • 2015-01-25
      • 2016-02-15
      • 2017-06-30
      相关资源
      最近更新 更多