金仓kingbase连接报错The authentication type 10 is not supported. Check that you have configured the sys_hba.conf file to include the client's IP address or subnet
原文链接: https://developer.aliyun.com/article/976306
https://blog.csdn.net/weixin_44480167/article/details/120987851
The authentication type 10 is not supported. Check that you have configured the sys_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.
原因: Kingbase
驱动的版本与服务版本不一致!!数据库服务用的是 8.6.0
,但是用的驱动是 8.2.0
。
人大金仓驱动包kingbasejdbc8.6.0.jar V8驱动jar包
工作上要将kingbaseV8数据库整合到项目,我在官网找了半天,连个jdbc驱动包下载入口都找不到,简直就是官方文档毫无诚意。emm…套着postgreSQL的国产数据库,我差点用postgreSQL的jdbc来代替驱动包。因此我直接在安装数据库的服务器执行find -name *.jar
将jdbc驱动包下载来,不用什么积分下载,我已经分享到阿里云盘:
https://www.aliyundrive.com/s/Yf5UGQ6Tmdj
需要的同学自行下载 (ES V8版本)
driver-class-name: com.kingbase8.Driver
url: jdbc:kingbase8://10.8.4.66:54321/template1?characterEncoding=utf8
username: system
password: 123456
# hibernate的方言改为
dialect: org.hibernate.dialect.PostgreSQL82Dialect
1
2
3
4
5
6
7
<dependency>
<groupId>com.kingbase8.jdbc</groupId>
<artifactId>kingbase8</artifactId>
<version>8.6.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/jar/kingbase8-8.6.0.jar</systemPath>
</dependency>
在kingbase的SQL语句的书写表名上要使用模式名.表名,否则会报错误500,找不到字段