合 【故障处理】psql客户端连接PG报错“psql error expected authentication request from server, but received v”
我的Linux环境执行psql连接PG数据库报以下的错误:
1 2 | [root@docker35 ~]# /usr/pgsql-13/bin/psql -U postgres -h 192.168.66.35 -p 15433 psql: error: expected authentication request from server, but received v |
首先,服务器肯定是没有任何问题的,证明一下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | C:\Users\lhrxxt>psql -U postgres -h 192.168.66.35 -p 15433 Password for user postgres: psql (13.3) Type "help" for help. postgres=# postgres=# postgres=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+-----------+------------+------------+----------------------- bench | postgres | UTF8 | en_US.utf8 | en_US.utf8 | db1 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | db10 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | db2 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | db3 | postgres | SQL_ASCII | C | C | db4 | postgres | SQL_ASCII | en_US.utf8 | en_US.utf8 | db5 | postgres | SQL_ASCII | C | C | db6 | postgres | SQL_ASCII | C | C | db7 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | korean | postgres | SQL_ASCII | C | C | lhrdb | postgres | UTF8 | en_US.utf8 | en_US.utf8 | postgres | postgres | UTF8 | en_US.utf8 | en_US.utf8 | template0 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres + | | | | | postgres=CTc/postgres (14 rows) |
那这个问题很奇怪哟,先来个百度和Google搜索一番,均无结果。