---
title: MySQL 驱动错误-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于MySQL 驱动错误相关的常见问题和使用技巧，帮助您快速解决MySQL 驱动错误的难题。
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

划线反馈

# MySQL 驱动错误

更新时间：2026-06-03 03:01

适用版本： V2.1.x、V2.2.x、V3.1.x、V3.2.x 内容类型：Troubleshoot  

本文介绍使用 MySQL V5.1.43 驱动报错的处理方法。

## 适用版本

OceanBase 数据库所有版本

## 问题现象

MySQL V5.1.43 驱动提示错误，错误信息如下。

```unknow
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2020-07-16 22:49:53.585 |-ERROR [main] org.springframework.boot.SpringApplication [771] -|Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactoryBuilder' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactoryBuilder' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaVendorAdapter' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaVendorAdapter]: Factory method 'jpaVendorAdapter' threw exception; nested exception is com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Unknown system variable 'have_query_cache'

```

## 可能原因

MySQL V5.1.43 版本增加了一个 `query_cache` 的校验功能，实际该功能在 MySQL 中不建议使用，在其他版本的 JDBC 驱动中均不存在该参数检测。

## 解决方式

替换 MySQL 驱动版本即可解决。

[下载地址](https://downloads.mysql.com/archives/c-j/)

上一篇

[直连普通租户时遇到报错：Tenant not in this server](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000683806)

下一篇

[触发 force_disconnect 场景分析汇总](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000003210709) ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
