Error updating database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection;
时间: 2023-08-19 20:13:54 浏览: 138
Springboot+MySQL,出现Could not get JDBC Connection
5星 · 资源好评率100%
回答: 错误"Error updating database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection"通常是由于数据库连接配置错误导致的。根据引用\[1\]中的信息,你需要确保在pom.xml文件中将MySQL数据库驱动程序的版本更改为8.0.12,并在jdbc.properties文件中正确配置数据库连接参数。另外,引用\[2\]中的错误信息表明数据库可能被锁定,你可以尝试重新启动事务来解决这个问题。引用\[3\]中的错误信息表明SQL语法有误,你需要检查SQL语句是否正确。请仔细检查你的数据库连接配置和SQL语句,确保它们正确无误。
#### 引用[.reference_title]
- *1* [Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could no](https://blog.csdn.net/Sun_Hongbin/article/details/81873967)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Loc](https://blog.csdn.net/weixin_56061622/article/details/124737351)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [org.springframework.jdbc.BadSqlGrammarException: Error updating database](https://blog.csdn.net/weixin_62765017/article/details/128389734)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文