当前位置:网站首页>连接数据库时出现WARN: Establishing SSL connection without server‘s identity verification is not recommended.
连接数据库时出现WARN: Establishing SSL connection without server‘s identity verification is not recommended.
2022-08-11 05:29:00 【zhangkai__】
这个错误是-->不建议在没有服务器身份验证的情况下建立SSL连接。 根据MySQL 5.5.45 +,5.6.26 +和5.7.6+的要求,如果未设置显式选项,则默认情况下必须建立SSL连接。默认为建立链接true,我们只需要让他不建立,设置为false 即可。
所以解决办法就是在url的最后添加“&useSSL=false”
// 3、数据源配置
DataSourceConfig dsc = new DataSourceConfig();
dsc.setUrl("jdbc:mysql://localhost:3306/glkt_vod?useSSL=false");
dsc.setDriverName("com.mysql.jdbc.Driver");
dsc.setUsername("root");
dsc.setPassword("123456");
dsc.setDbType(DbType.MYSQL);
mpg.setDataSource(dsc);
记得在包和条件语句连接处加上“?”
边栏推荐
- 第一章 Verilog语言和Vivado初步使用
- USB 枚举过程中8 字节标准请求解析
- Day 84
- js学习进阶BOM部分(pink老师笔记)
- 微信小程序启动页的实现
- The whole process of Tinker access --- Compilation
- 自己动手写RISC-V的C编译器-02语法描述方法和递归下降解析
- Day 78
- Vscode远程连接服务器终端zsh+Oh-my-zsh + Powerlevel10 + Autosuggestions + Autojump + Syntax-highlighting
- Goldbach's conjecture and the ring of integers
猜你喜欢
随机推荐
OpenMLDB + Jupyter Notebook:快速搭建机器学习应用
Day 83
mk文件介绍
哥德巴赫猜想与整数环
Day 84
Js method commonly used objects and attributes
The whole process of Tinker access --- Compilation
微信小程序启动页的实现
杀死进程-查看防火墙状态
编译异常解决
Pinyougou project combat notes
SearchGuard配置
星盟-pwn-babyheap
黑马大事件项目
Day 72
Interpretation of the paper: GAN and detection network multi-task/SOD-MTGAN: Small Object Detection via Multi-Task Generative Adversarial Network
本地缓存cookie的使用
【无标题】
自己动手写RISC-V的C编译器-00环境配置
第四范式OpenMLDB优化创新论文被国际数据库顶会VLDB录用