0
点赞
收藏
分享

微信扫一扫

解决SpringBoot 连接数据库失败,报错Error querying database.

吃面多放酱 2022-01-31 阅读 34

在SpringBoot项目中,想连接数据库查询数据时,发现页面报出“Whitelabel Error Page The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server…”的错误,大致意思是:在连接数据库时出现意外,导致无法连接。
在这里插入图片描述
出现上述情况,极大可能是数据库信息配置错误,要检查下Spring项目中yml文件里配置数据库的参数是否有误,特别注意以下4个参数:
在这里插入图片描述

举报

相关推荐

0 条评论