无法连接到redshift数据库 [英] can't connect to redshift database

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

问题描述

我正在尝试使用Postgre JDBC驱动程序从SQL Workbench/J连接到Redshift数据库,但无法通过.我收到此错误连接尝试失败". jdbc驱动程序已正确定位.我也尝试通过Aginity Workbench for Redshift,但是它无法显示数据库列表.我有到jdbc:postgresql://host:port/name_of_database形式的数据库的连接URL,但令人惊讶的是,我什至无法ping通主机.我可以通过Amazon Console看到数据库的运行状况良好.所以,我的问题是:

I'm trying to connect to Redshift database from SQL Workbench/J using Postgre JDBC drivers but I can't get through. I get this error "The connection attempt failed". The jdbc driver is properly located. I also tried through Aginity Workbench for Redshift but it was unable to show the list of databases. I have my connection url to the database of the form jdbc:postgresql://host:port/name_of_database but surprisingly I could not even ping the host. I can see that the health of database is good through amazon console. So, my questions are:

  1. 为什么我不能ping我的redshift数据库服务器?
  2. 是否有ssh可以连接到db服务器?

Edit1:将我的公共IP添加到安全组后,主机在ping时得到解析,但仍然有100%的数据包丢失.

After adding my public IP to security group the host gets resolved while pinging but still there's 100% packet loss.

Edit2:我可以在EC2-Classic中成功托管数据库,但不能在EC2-VPC中成功托管该数据库.由于我的公共IP不足,因此我尝试在100%数据包丢失的VPC中重新托管数据库.

I could successfully host the db in EC2-Classic but not in EC2-VPC. Since I'm running short of public IPs I tried re-hosting the db in VPC where there is 100% packet loss.

推荐答案

您必须将IP地址块添加到群集的安全组中.

You have to add your IP address block into the security group for the cluster.

这与其他安全组(即VPC)分开.

This is separate from other security groups (i.e. VPC).

您可以在Redshift控制台的左侧找到它. https://console.aws.amazon.com/redshift/

You can find it on the left in the Redshift Console. https://console.aws.amazon.com/redshift/

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

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