连接数据库问题

来源:1-3 (补充)项目源码导入,配置,运行,入坑,出坑-1

weixin_慕前端1471998

2019-01-17

HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database! ### The error may exist in URL [jar:file:/D:/BaiduNetdiskDownload/eclipse/wk/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ocPortal/WEB-INF/lib/ocService-1.0.0-SNAPSHOT.jar!/com/online/college/core/consts/dao/ConstsSiteCarouselMapper.xml] ### The error may involve com.online.college.core.consts.dao.ConstsSiteCarouselDao.queryCarousels ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!

老师,都是按照视频配置为什么连不上数据库?

写回答

1回答

祁聪

2019-01-18

检查数据库连接的用户名、密码是否正确;

检查端口号;

可以先用navicat这样的客户端连一下,如果没有问题了,再配置到jdbc.properties中;

0
0

Java SSM快速开发仿慕课网在线教育平台

学习整合微信公众平台开发、新浪SAE云平台、七牛云、分布式部署等等

1074 学习 · 449 问题

查看课程