亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

無法獲取數據庫連接

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 java.sql.SQLException: Connections could not be acquired from the underlying database!

### The error may exist in file [C:\Users\菲菲\IdeaProjects\test\target\classes\mapper\AreaDao.xml]

### The error may involve com.example.test.dao.AreaDao.queryArea

### The error occurred while executing a query

### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!


正在回答

2 回答

jdbc.driverClass? ?= com.mysql.cj.jdbc.Driver

jdbc.url? ? ? = jdbc:mysql://127.0.0.1:3306/db?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT



1 回復 有任何疑惑可以回復我~
  1. 你可以先看看你的數據庫url配置是否少了數據庫名

  2. 或者你的配置缺少了什么,比如空格,單詞,或者末尾是不是多了個空格

  3. 如果你的數據庫是mysql-connector-java 6.0.x版本,driver是com.mysql.cj.jdbc.Driver

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

無法獲取數據庫連接

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號