JDBC连接问题
来源:3-14 解决IDEA的红色警告

慕慕5239605
2022-04-01
- 老师您好!我做到这里一直报错:是在5-6整合nacos时发现的问题
ERROR 14796 — [nio-8010-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [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: Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
The error may exist in com/itmuch/contentcenter/dao/share/ShareMapper.java (best guess)
The error may involve com.itmuch.contentcenter.dao.share.ShareMapper.selectByPrimaryKey
The error occurred while executing a query
Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.] with root cause
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
写回答
1回答
-
大目
2022-04-01
您好,报错是说数据库连接不上。
建议看下配置的账号密码是否正确,另外如果是远程访问mysql,可以确认下mysql是否开启了允许远程访问00
相似问题