码迷,mamicode.com
首页 > 数据库 > 详细

mysql版本报错

时间:2020-02-24 16:44:46      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:group   jid   数据库连接   cti   cte   nic   erro   dea   conf   

IntelliJIdea2019.3打开原项目报mysql版本报错:

Error opening zip file or JAR manifest missing : /C:/Users/flycat/.IntelliJIdea2019.3/config/plugins/mysql-explain/lib/mysql-explain-agent-jar-with-dependencies.jar

查看MYSQL版本,原来是5.1.40,直接调整为8.0.19解决方法:
<mysql.version>8.0.19</mysql.version>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
<scope>runtime</scope>
</dependency>

依然报错,进一步分析,MYSQL8的连接串是
com.mysql.cj.jdbc.Driver,
V5的是com.mysql.jdbc.Driver
且需要在URL中加入

&useSSL=false&&serverTimezone=CST


数据库连接配置也要做相应的调整:
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://localhost:3306/smartfactory?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&&serverTimezone=CST
username: root
password:
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;password=${spring.datasource.password}
driverClassName: com.mysql.cj.jdbc.Driver


mysql版本报错

标签:group   jid   数据库连接   cti   cte   nic   erro   dea   conf   

原文地址:https://www.cnblogs.com/smartfactory/p/12357484.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!