如何从mac连接到aws Redshift db

时间:2014-06-26 14:03:15

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

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

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

由于

1 个答案:

答案 0 :(得分:3)

如果正确配置了安全组设置,则应使用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