今天重新安装了新版的DataGrip 2026.1版本后连接sql server结果报了各种错误的。其实主要原因就是sql server 的版本低驱动低导致的。怎么解决呢比如DBMS: Microsoft SQL Server (ver. 13.00.5026) Case sensitivity: plainmixed, delimitedmixed Driver: Microsoft JDBC Driver 11.2 for SQL Server (ver. 11.2.0.0, JDBC4.2)The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: (unexpected_message) SQL Server did not return a response. The connection has been closed. ClientConnectionId:193019e6-4385-4f6e-bb13-2bc6f4b7e6a5.DBMS: Microsoft SQL Server (ver. 13.00.5026)Case sensitivity: plainmixed, delimitedmixedDriver: Microsoft JDBC Driver 11.2 for SQL Server (ver. 11.2.0.0, JDBC4.2)encrypt property is set to false and trustServerCertificate property is set to false but the driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption: Error: (unexpected_message) SQL Server did not return a response. The connection has been closed. ClientConnectionId:9dddd067-74bd-4fc5-9cba-ffc0d17ade5e.1、首先最快的方式肯定是要把驱动降下来比如我本地的sql server是2016、服务器的是2013所以经过不断的测试最终只能支持10以下的版本不包含2、如果版本降下来还是报“[08S01] 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“(certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”。 ClientConnectionId:8e390bef-39d7-48bd-82fb-bb9de41fbaecunable to find valid certification path to requested target.””类似的错误或者驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]……等那么还得需要改配置。即修改DataGrip安装目录下的\jbr\conf\security\java.security文件将jdk.tls.disabledAlgorithmsSSLv3, TLSv1, TLSv1.1, DTLSv1.0, RC4, DES, \MD5withRSA, DH keySize 1024, EC keySize 224, 3DES_EDE_CBC, anon, NULL, \ECDH, TLS_RSA_*, rsa_pkcs1_sha1 usage HandshakeSignature, \ecdsa_sha1 usage HandshakeSignature, dsa_sha1 usage HandshakeSignature修改为jdk.tls.disabledAlgorithmsSSLv3, RC4, DES, MD5withRSA, \DH keySize 1024, EC keySize 224, anon, NULL3、如果想要用高版本的驱动提示DBMS: Microsoft SQL Server (ver. 13.00.5026)Case sensitivity: plainmixed, delimitedmixedDriver: Microsoft JDBC Driver 11.2 for SQL Server (ver. 11.2.0.0, JDBC4.2)encrypt property is set to false and trustServerCertificate property is set to false but the driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption: Error: (unexpected_message) SQL Server did not return a response. The connection has been closed. ClientConnectionId:9dddd067-74bd-4fc5-9cba-ffc0d17ade5e.则需要在连接URL后面添加如下配置encryptfalse;trustServerCertificatetrue;如jdbc:sqlserver://localhost\db:端口;databasedb;encryptfalse;trustServerCertificatetrue;注意用高版本的驱动哪怕URL后面配置了encryptfalse;trustServerCertificatetrue也要修改java.security文件的jdk.tls.disabledAlgorithms值。