【问题标题】:How to connect to aws Redshift db from mac如何从 mac 连接到 aws Redshift db
【发布时间】:2014-06-26 14:03:14
【问题描述】:

我使用的是 mac,我通常使用 Sequel Pro 与 sql 数据库进行交互。通常我使用mysql,但我了解redshift使用Postgres。

当我尝试连接到我的 Redshift 数据库时,我应该使用 IP 还是“端点”?

当我尝试连接时,我从 Sequel Pro 收到此错误。

Unable to connect to host {{my_db_host}}, or the request timed out.

Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).

MySQL said: Can't connect to MySQL server on '{{my_db_host}}' (4)

谁能提供有关如何建立联系的建议?

谢谢

【问题讨论】:

  • 仅供参考,Redshift 基于 ParAccel,它是一个非常旧的 PostgreSQL 版本的经过大量修改的分支。这很像说“Drizzle 使用 MySQL”。
  • Redshift 是 90% 的 PSQL,以及没有理由以这种方式处理大数据的特定事物
  • @djc391 90% 古老的 PostgreSQL,是的。删除了一大堆功能和特性(如程序语言)。它是一个有用的产品,没有任何问题,但它真的不再是 PostgreSQL。

标签: macos postgresql amazon-web-services amazon-redshift sequelpro


【解决方案1】:

如果您的安全组设置配置正确,您应该使用 Redshift Endpoint。您可能希望在测试期间将您的组设置为 0.0.0.0/0(这会将您的集群打开到整个互联网,您可以稍后将其锁定)

您还需要确保您拥有正确的 ODBC/JDBC 驱动程序。我推荐 Netbeans(附带连接驱动程序)、SQL Workbench 或 Aginity Redshift。默认端口为 5439。

我认为您使用了错误的驱动程序(mysql 驱动程序而不是 psql 驱动程序),因为您的错误是 MySQL 服务器。

http://docs.aws.amazon.com/redshift/latest/gsg/rs-gsg-prereq.html

对于mac,我相信你也可以尝试使用终端PSQL客户端。比如……

psql -H endpoint.aws.com -p 5439 -U username --password

【讨论】:

  • SQL Workbench 是一个不错的选择。 Guide
  • 对于 os x:brew install postgresql,然后:psql --host=hostname --port=5439 --dbname=dev --username=admin
猜你喜欢
  • 2018-07-23
  • 1970-01-01
  • 2020-02-04
  • 2018-09-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-10-22
相关资源
最近更新 更多