SQL Workbench / J中的Redshift连接问题

时间:2017-08-29 07:47:07

标签: jdbc amazon-redshift sql-workbench-j

我开始学习亚马逊红移,并按照其文档创建了一个群集。

我选择了2个月的免费试用。当我尝试从SQL workbench / J连接到Redshift数据库时,它说"连接超时错误"。

我查了一下,我输入的所有细节都是正确的!我通过公司局域网从我的笔记本电脑访问Redshift数据库。我认为这是一个问题。告诉我如何从公司LAN连接连接到Redshift?

我尝试连接时SQL Workbench / J的响应是:

  

[Amazon] [500150]设置/关闭连接时出错:连接超时:连接。

2 个答案:

答案 0 :(得分:2)

检查您的群集是否具有公共访问权限:转到Redshift控制台,查看Publicly Accessible是否为“是”。

检查安全组是否允许从您的IP进行访问。您可以使用“nc -v endpoint port”来检查群集的端口是否可ping。

答案 1 :(得分:0)

Go into EC2 Management Console
On the left navigation pane, look for Network & Security header and click on Security Groups. (https://us-west-2.console.aws.amazon.com/ec2/v2/home?region=us-west-2#SecurityGroups:sort=groupId)
Notice the row with name "launch-wizard-1" in the Group Name's column. Click that. Then select the Inbound tab, and click Edit.
Add Rule: Type=Redshift, Source=MyIP. (auto-fill)  [Note: Later if you want to use muliple source to connect to that cluster, say Tableau, Quick Sight, etc. I would suggest making it public)
Save it.
Try to connect again from within SQLWorkbench/J.