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

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

问题描述

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

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 连接到数据库服务器?

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,我尝试在 VPC 中重新托管数据库,其中 100% 数据包丢失.

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/

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

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