You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Quarkus连接MySQL时数据库版本不匹配问题求助

Quarkus连接数据库版本不匹配报错解决方法

Persistence unit '' was configured to run with a database version of at least '8.0.0', but the actual version is '5.5.0'. Consider upgrading your database. Alternatively, rebuild your application with 'quarkus.datasource.db-version=5.5.0' (but this may disable some features and/or impact performance negatively)

方法一:升级数据库版本

  • 直接将数据库版本升级到8.0.0及以上,完全匹配Quarkus应用的默认配置要求,既能保留所有特性,也能保证最佳性能。

方法二:修改Quarkus配置适配旧数据库

  • 在应用的配置文件中添加对应配置,适配当前5.5.0版本的数据库:
    • 若使用application.properties:
      quarkus.datasource.db-version=5.5.0
      
    • 若使用application.yml:
      quarkus:
        datasource:
          db-version: 5.5.0
      
  • 注意:此方式会禁用Quarkus针对高版本数据库优化的部分特性,可能对应用性能产生负面影响,仅在无法升级数据库时采用。

内容的提问来源于stack exchange,提问作者Umesh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.18 19:32:33