問題解決:idea 中無法連接 sql server 數據庫,報錯 [08S01] 驅動程序無法通過使用安全套接字層(SSL)加密與 SQL Server 建立安全連接

報的錯誤信息如下:

[08S01] 驅動程序無法通過使用安全套接字層(SSL)加密與 SQL Server 建立安全連接。錯誤:“PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”。 ClientConnectionId:721941c7-3e08-4e80-bc56-418e1c051624 sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.

查了一些解決辦法,都不怎麼奏效。原來只需要一個設置就行了,如下圖,只需要設置 trustServerCertificate 即可解決問題。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章