gpt4 book ai didi

postgresql - DataGrip Postgres SSL 错误 : sun. security.validator.ValidatorException

转载 作者:行者123 更新时间:2023-11-29 11:18:31 25 4
gpt4 key购买 nike

DataGrip 无法连接到我的 Postgres 实例,但我可以通过终端上的 psql 正常连接:

psql -h dbhost.com reps username
>Password for user... (connects)

但是,IntelliJ DataGrip 抛出:

Connection to username@dbhost.com failed.
SSL error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

它使用的连接字符串是jdbc:postgresql://dbhost.com:5432/dbname

最佳答案

尝试在数据库属性窗口的 SSH/SSL 选项卡中禁用 SSL 复选框。

然后将 ?sslmode=require 附加到“常规”选项卡中的 URL,使其内容如下: jdbc:postgresql://localhost:5432/reps?sslmode=require

关于postgresql - DataGrip Postgres SSL 错误 : sun. security.validator.ValidatorException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42246111/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com