当前位置:网站首页>使用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带来的一些困扰
边栏推荐
- [practice] appium settings app is not running after 5000ms
- JS基础10
- JS基础1-JS引入与运算符
- 培训通知|2022年境外中资企业机构及人员疫情防控和安全防范专题培训通知
- 使用API快捷创建ECS
- Markdown -- basic usage syntax
- 毕业季,给初入社会的你一些建议
- Does flink1.15 support MySQL views? I configured the view name at the table name to save, but the table could not be found. Think
- Wealth management for programmers
- Blue Bridge Cup Maze (dfs+ backtracking)
猜你喜欢

还在用 SimpleDateFormat 做时间格式化?小心项目崩掉!

Scientific research - web of science retrieval skills

Wealth management for programmers

Redis6 一:Nosql引入、Redis可以解决什么问题?
![[practice] appium settings app is not running after 5000ms](/img/3c/5a7544561231a15a4bb5cfa9e102b3.png)
[practice] appium settings app is not running after 5000ms

How does ETF position affect spot gold price?

JS基础3

JS foundation 3

Solve the problem of reading package listsdonebuilding dependency treereading state informationdone

Yann LeCun新论文:构建自动智能体之路
随机推荐
GEE:基于 MCD64A1 的 GlobFire 日常火灾数据集
毕业季,给初入社会的你一些建议
Graduation season, some suggestions for you who are new to the society
Does flink1.15 support MySQL views? I configured the view name at the table name to save, but the table could not be found. Think
Download and install mysql5.7 for windows 10
工作组环境下的内网渗透:一些基础打法
[semidrive source code analysis] [x9 chip startup process] 32 - play module analysis - RTOS side
工控安全之勒索病毒篇
MySQL common commands for viewing database performance
JS foundation 2
Debug debugging in katalon
String & heap & method area
MySQL installation configuration and solving the problem of forgetting root password when reinstalling MySQL
Wealth management for programmers
JS foundation 1-js introduction and operator
[QT] connect syntax reference implementation
Introduction to GDB
Katalon全局变量在TestObject引用
【实操】Appium Settings app is not running after 5000ms
【剑指Offer】49. 丑数