打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
The authentication type 10 is not supported
userphoto

2023.08.21 北京

关注

连接PG数据库报错

org.postgresql.util.PSQLException: The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.

修改pg_hba.conf配置文件当中的ipv4如下

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
#host   all             all             127.0.0.1/32            trust
host    all             all             0.0.0.0/0               trust
# IP6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     trust
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust

host all all all scram-sha-256

或者采用如下的方式:

解决方法将pg_hba.conf由"host all all all scram-sha-256"改"host all all all trust"
····
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
PostgreSQL访问控制,允许&禁止指定IP访问
PostgreSQL忘记postgres账号的密码怎么办?
greenplum客户端连接数据库配置及问题
Dropcam Specifications (Specs) : Dropcam Support
navicat 连接postgresql报错pg
disconnected no supported authentication methods available(server sent: publickey,keyboard interae)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服