当前位置:网站首页>使用ssm项目对Mysql8进行访问的时候,出现连接失败和一些错误的解决办法
使用ssm项目对Mysql8进行访问的时候,出现连接失败和一些错误的解决办法
2022-06-28 11:08:00 【soha_dong】
这时候首先要把mysql的驱动的版本号改为如下设置
<!-- 数据库驱动 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
<scope>runtime</scope>
</dependency>
再把jdbc的连接改为
jdbc.jdbcUrl=jdbc:mysql://localhost:3306/XXXX?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
标记红色的地方很重要,不然可能为出现一些别的问题!
jdbc连接的ClassName为 "com.mysql.cj.jdbc.Driver"
如果你使用了com.alibaba.druid这个连接数据库的库文件也需要修改配置为:
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.10</version>
</dependency>
这样子可以有效的预防Mysql8带来的一些困扰
边栏推荐
- JS基础3
- Katalon framework tests web (XX) custom keywords and upload pop-up operations
- [practice] appium settings app is not running after 5000ms
- 元宇宙系统的发展与原理介绍
- JS基础4
- 科研丨Web of Science检索技巧
- How to distinguish and define DQL, DML, DDL and DCL in SQL
- [cloud resident co creation] detailed introduction to DWS alarm service DMS and cluster connection mode
- 100 important knowledge points that SQL must master: retrieving data
- [practice] 1364- implement a perfect waterfall flow component on the mobile terminal (with source code)
猜你喜欢
Docker modifies the user name and password of MySQL
Mysql database overview and installation process
Ruoyi integrated building block report (NICE)
Dataease installation upgrade
论文阅读 (59):Keyword-Based Diverse Image Retrieval with Variational Multiple Instance Graph
Redis6 一:Nosql引入、Redis可以解决什么问题?
sentinel
Zero foundation self-study SQL course | if function
还在用 SimpleDateFormat 做时间格式化?小心项目崩掉!
MySQL (I)
随机推荐
【agora】get 一个 agora_refptr 对象的用法示例
Download and install mysql5.7 for windows 10
Compareto() and equals() methods of BigDecimal class
Katalon global variable is referenced in testobject
毕业季 新的开始
Making and using of static library
Using loops for, while, and if in katalon else、break、continue
Katalon framework tests a web page operation example code
时间戳和date转换「建议收藏」
MySQL(二)
Redis6 1: what problems can be solved by the introduction of NoSQL and redis?
压缩解压
选择哪种编程语言,会吸引优秀的人才?
[sword finger offer] 49 Ugly number
Metersphere uses JS to refresh the current page
Making and using of dynamic library (shared library)
使用API快捷创建ECS
flink1.15,支持mysql视图吗?我这边在table-name处配置视图名保存,找不到表。想
Realization of a springboard machine
soapui的菜鸟教程