简体   繁体   中英

Django app on Elastic Beanstalk can't connect to RDS

I have a Django app running on Elastic Beanstalk that is throwing the following error:

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

I have no issue connecting to the EB server via ssh and then connecting to MySql:

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

So I've ruled out that its a firewall issue, or problems with my VPC. I've also tried hardcoding the credentials in the settings.py file to rule out issues with the ENV vars. I don't know much about Django so any help would be appreciated.

I was missing some packages for my .ebextensions, I added:

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

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM