如何从aws'Endpoint'找到unix'host'

时间:2015-08-06 23:27:37

标签: amazon-web-services pg-dump

我正在寻找要在此配置选项中使用的aws数据库服务器的“主机”:

-h host
--host=host

Specifies the host name of the machine on which the server is running.
If the value begins with a slash, it is used as the directory for the
Unix domain socket. The default is taken from the PGHOST environment
variable, if set, else a Unix domain socket connection is attempted.

但我能找到的就是这个'端点':

Endpoint: foobar.ab12cd34ef.eu-west-1.rds.amazonaws.com:5432

这有关系吗?有没有办法从'端点'中提取'主机'?

1 个答案:

答案 0 :(得分:1)

使用端点作为主机,它应该用于连接到RDS。 5432是它正在运行的端口。

RDS为您提供端点,因为按设计它可以有多个后端"主机" (数据库实例)提供诸如在多AZ环境中的数据。通过为您提供端点,当主服务器出现故障并且从服务器被提升为主服务器等时,您不必更改连接字符串。