Postgresql psql:如何明确告诉端口号

Postgresql psql:如何明确告诉端口号,postgresql,Postgresql,我已经安装了postgresql,在postgresql.conf中我看到端口是5433而不是5432。 现在,当我尝试通过psql连接到服务器时,得到的错误如下: psql:错误:无法连接到服务器:无法连接到服务器:连接被拒绝 (0x0000274D/10061) 无法连接到服务器:连接被拒绝(0x0000274D/10061) 那么我可以告诉in命令连接到端口5433吗?明白了。其: psql-U postgres-p5433 Is the server running on hos

我已经安装了postgresql,在postgresql.conf中我看到端口是5433而不是5432。 现在,当我尝试通过psql连接到服务器时,得到的错误如下:

psql:错误:无法连接到服务器:无法连接到服务器:连接被拒绝

(0x0000274D/10061)

无法连接到服务器:连接被拒绝(0x0000274D/10061)

那么我可以告诉in命令连接到端口5433吗?

明白了。其:

psql-U postgres-p5433
   Is the server running on host "localhost" (::1) and accepting

   TCP/IP connections on port 5432?
   Is the server running on host "localhost" (127.0.0.1) and accepting

   TCP/IP connections on port 5432?