作者:心情爱心_634 | 来源:互联网 | 2023-08-08 11:20
篇首语:本文由编程笔记#小编为大家整理,主要介绍了mysql版本报错相关的知识,希望对你有一定的参考价值。
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解决方法:
8.0.19
mysql
mysql-connector-java
${mysql.version}
runtime
依然报错,进一步分析,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