在某次更新Microsoft SQL连接驱动后,出现了连接异常:
[08S01] 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”。 ClientConnectionId:aa01cec2-3ffc-4561-9fb0-d82399d674e7
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
解决办法:选择驱动版本为旧版本,这里是改为9.4版本
测试连接,ok
第二步:将下载的两个JAR文件复制到:JDK
安
装目录\jre\lib\ext下,例如我的就是D:\java\jdk1.6.0.43\jre\lib\ext
打开java.security文件:在JDK
安
装目录\jre\lib\security下的java.security文件。
找到security.provider.1=sun.security.provider.Sun换成
security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider
注意事项:改完以后,在运行Tomcat时,会报错,但此时
数据库
是可以
连接
成功的。(不改和原因报的错误是一样的)
(此步不配置也可以正确)第三步:将"D:\java\jdk1.6.0.43\jre\lib\ext"添加到系统环境变量CLASSPATH中
重新执行
连接
数据库
程序就可以
# jdk.tls.disabledAlgorithms=MD5,
SSL
v3, DSA, RSA keySize < 2048, \
# rsa_pkcs1_sha1, secp224r1
jdk.tls.disabledAlgorithms=
SSL
v3, RC4, DES, MD5withRSA, \
DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
include jd...
出现
异常
:
javax.net.
ssl
.
SSL
HandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested t
[08S01]
驱动程序
无法
通过
使用
安全
套接字
层
(
SSL
)
加密
与
SQL
Server
建立
安全
连接
。错误:“The
server
selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]”。 ClientConnectionId:da918ed5-2615-4bbb-a54b-c184ada18897
The
server
selected protocol version TLS10 is n
日常开发中少不了各种可视化
数据库
管理工具。如果需要同时能
连接
多种
数据库
,大家肯定都会想到 DBeaver、Navicat Premium。本文介绍另一个十分好用且强大的工具:
DataGrip
。
DataGrip
是 JetBrains 公司推出的管理
数据库
的产品。对于 JetBrains 公司,开发者肯定都不陌生,IDEA 和 ReSharper 都是这个公司的产品,用户体验非常不错。
DataGrip
提供 Windows 版本和 macOS 版本,支持几乎所有主流的关系数据...
驱动程序
无法
通过
使用
安全
套接字
层
(
SSL
)
加密
与
SQL
Server
建立
安全
连接
。错误:“The
server
selected protocol version TLS10 is not accepted by client preferences [TLS12]”
datagrip
更改驱动即可解决
使用
DataGrip
连接
SQL
Server
2008
打开
SQL
Server
配置管理器,并启用
SQL
Server
网络配置中的
SQL
EXPRESS协议中的TCP/IP,并双击TCP/IP修改属性中的IP地址框的IPALL的端口
使用
DataGrip
连接
SQL
Server
2008
点击“+”号键选择
SQL
Server
下载
连接
需要的驱动
点击TestConnect...