3

我使用的是 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)

任何人都可以提供有关如何连接的建议吗?

谢谢

4

1 回答 1

4

如果您的安全组设置配置正确,您应该使用 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
于 2014-06-26T17:44:33.007 回答