gpt4 book ai didi

macos - 如何从 mac 连接到 aws Redshift db

转载 作者:行者123 更新时间:2023-11-29 12:05:24 28 4
gpt4 key购买 nike

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

关于macos - 如何从 mac 连接到 aws Redshift db,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24432652/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com