AWS:无法从我的机器连接到RDS数据库

编程入门 行业动态 更新时间:2024-10-25 22:23:44
本文介绍了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'(10060))

OperationalError: (2003, "Can't connect to MySQL server on 'aa9jliuygesv4w.c03i1 ck3o0us.us-east-1.rds.amazonaws' (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:

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

    AWS:无法从我的机器连接到RDS数据库

    本文发布于:2023-10-23 22:32:53,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1522194.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:连接到   我的机器   数据库   AWS   RDS

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!