简体   繁体   English

即使在安全组中添加了 CIDR/IP,也无法访问 AWS RDS 数据库

[英]Can't access AWS RDS database even though CIDR/IP added in security group

I have created a db instance (sql server ex) in my AWS account and now trying to access it via MS SQL Server Management Studio or via Visual Studio Server Explorer, but i can't, i get the errors like below:我在我的 AWS 帐户中创建了一个 db 实例(sql server ex),现在尝试通过 MS SQL Server Management Studio 或 Visual Studio Server Explorer 访问它,但我不能,我收到如下错误:

在此处输入图片说明

在此处输入图片说明

I have added my ip address in inbound under security group as well:我也在安全组下的入站中添加了我的 IP 地址: 在此处输入图片说明

I Tried all the above steps but didn't work.我尝试了上述所有步骤,但没有奏效。 Even though, i have selected 'Publicly Accessible' while using visual studio, it didnt reflect in the aws console.即使我在使用 Visual Studio 时选择了“可公开访问”,它也没有反映在 aws 控制台中。 So, the below steps worked for me.因此,以下步骤对我有用。 Please try this.请试试这个。

Note:- this is only for my testing/learning purposes.注意:-这仅用于我的测试/学习目的。 So, i made it publicly accessible.所以,我把它公开了。 You might not enable publicly accessible if there is a security issue.如果存在安全问题,您可能不会启用可公开访问。 If you are testing/using for learning purposes, you can follow the below approach.如果您出于学习目的进行测试/使用,则可以遵循以下方法。

Make sure your port is publicly accessible .Else you will not be able to connect.确保您的端口可公开访问。否则您将无法连接。

To enable the public accesss, please follow the below steps.要启用公共访问,请按照以下步骤操作。

  1. Select the db instance --> click Modify选择数据库实例 --> 点击修改

修改实例

  1. Scroll to connectivity Section, expand 'Additional configuration' section --> select 'Publicly Accessible'--> Scroll to bottom --> select update.滚动到连接部分,展开“其他配置”部分--> 选择“可公开访问”--> 滚动到底部--> 选择更新。 (as shown below). (如下所示)。 在此处输入图片说明
  1. Your db instance will be in modifying state and after 2-3 minutes it will be available.您的数据库实例将处于修改状态,并在 2-3 分钟后可用。 Now, give it a try to connect again and you will be able to connect now.现在,尝试再次连接,您现在就可以连接了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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