欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

psql登录远程的服务器端实例

程序员文章站 2022-06-21 20:54:30
psql登录远程的服务器端实例 microsoft windows [版本 10.0.16299.309] (c) 2017 microsoft corporation。保留所有权利。...

psql登录远程的服务器端实例

microsoft windows [版本 10.0.16299.309]
(c) 2017 microsoft corporation。保留所有权利。

c:\users\administrator>psql -h 192.168.80.148 -p 5532 -d postgres
psql: 无法联接到服务器: connection refused (0x0000274d/10061)
        服务器是否在主机 "192.168.80.148" 上运行并且准备接受在端口
5532 上的 tcp/ip 联接?

c:\users\administrator>psql -h 192.168.80.148 -p 5532 -d postgres
psql: fatal:  no pg_hba.conf entry for host "192.168.80.1", user "administrator", database "postgres" ---->注意此处的user "administrator"

c:\users\administrator>psql -h 192.168.80.148 -p 5532 -d postgres
psql: fatal:  no pg_hba.conf entry for host "192.168.80.1", user "administrator", database "postgres"

c:\users\administrator>psql -h 192.168.80.148 -p 5532 -d postgres
口令:
psql: fatal:  password authentication failed for user "administrator"

c:\users\administrator>psql -h 192.168.80.148 -p 5532 -d postgres -u pg102
用户 pg102 的口令:
psql: fatal:  password authentication failed for user "pg102"

c:\users\administrator>