sqlserver连接报错:unable to find valid certification path to requested target

在配置SQLserver连接时,若trustServerCertificate设为true且加密启用,即使encrypt设为false,也会使用服务器指定的加密级别。当此设置不匹配时,连接可能会失败。特别地,某些如FlinkJDBC的连接器会默认设置encrypt为true,导致问题发生。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在SQL server参数增加:
encrypt=false;trustServerCertificate=true;

注意有的文章只建议增加trustServerCertificate。但是有些连接器(flink jdbc)会默认添加encrypt=true参数。造成连接失败。

If TrustServerCertificate is set to true and encryption is turned on, the encryption level specified on the server will be used even if Encrypt is set to false. The connection will fail otherwise. 

参考文章

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值