AWS:无法从我的机器连接到RDS数据库 [英] AWS: can't connect to RDS database from my machine

查看:126
本文介绍了AWS:无法从我的机器连接到RDS数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

EC2实例/实时Web可以很好地连接到RDS数据库.但是,当我想在本地计算机上调试代码时,我无法连接到数据库并收到此错误:

The EC2 instance/live web can connect just fine to the RDS database. But when I want to debug the code in my local machine, I can't connect to the database and got this error:

OperationalError:(2003年,无法连接到'aa9jliuygesv4w.c03i1上的MySQL服务器 ck3o0us.us-east-1.rds.amazonaws.com'(10060))

OperationalError: (2003, "Can't connect to MySQL server on 'aa9jliuygesv4w.c03i1 ck3o0us.us-east-1.rds.amazonaws.com' (10060)")

我已将.pem.ppk键添加到.ssh,并且已经配置了EB CLI.我不知道该怎么办.

I've added .pem and .ppk keys to .ssh and I already configure EB CLI. I don't know what should I do anymore.

仅供参考:该应用程序在Django中

FYI: The app is in Django

推荐答案

事实证明,这并不难.请执行以下步骤:

It turns out it is not that hard. Do these steps:

  1. 转到EC2仪表板
  2. 转到安全组"标签
  3. 选择并且仅选择RDS数据库安全组.您将在底部看到安全组详细信息
  4. 单击入站"选项卡
  5. 单击编辑"按钮
  6. 添加类型:MYSQL/Aurora;协议:TCP;范围:3306;源:0.0.0.0/0

这篇关于AWS:无法从我的机器连接到RDS数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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