连接mysql时一直出现以下的错误:

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 然后就将“
Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
” 当做问题的根源去搜索答案(当然,一搜发现这种错误还是挺多的)但是并不是我想要的答案

后来看到控制台的信息:
java.sql.SQLException: Unknown system variable 'query_cache_size'
原来这才是问题的根源所在!!! 原因是mysql驱动的版本号不匹配!!!(这篇博客简直是救我于水深火热之中)
直接抄过来了
如果mysql驱动版本号不匹配的话会出现:
java.sql.SQLException: Unknown system variable 'query_cache_size'
java.sql.SQLException: Unknown system variable 'tx_read_only'
java.sql.SQLException: Unknown system variable 'language' 解决办法,到maven依赖查询 去找到你安装的mysql的版本对应的驱动版本号的配置 解决了这问题,又出现时区的问题,woc!!! The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. 请移步至这篇博客

最新文章

  1. 下载最新版本的Oracle Database
  2. C# 获取指定目录下所有文件信息、移动目录、拷贝目录
  3. linux内核追踪——find_next_bit函数详详详解
  4. 18TH赛事管理
  5. Intellij Idea使用技巧、快捷键
  6. c++ 构造函数,拷贝构造函数,析构函数与赋值操作符
  7. ICMP协议
  8. ssh远程登录linux live系统
  9. LDA 线性判别分析
  10. 分类导航菜单的制作(附源码)--HTML
  11. A*寻路算法入门(二)
  12. 手把手教你提交文件到git
  13. 7.3 GRASP原则三: 低耦合 Low Coupling
  14. Linux下安装Anaconda
  15. list(zip(*querySet))使用
  16. Java 模仿 C# 字典 一例
  17. 【转】多线程:C#线程同步lock,Monitor,Mutex,同步事件和等待句柄(上)
  18. 【Atcoder】ARC102 题解
  19. BZOJ 1009 [HNOI2008]GT考试 (KMP + 矩阵快速幂)
  20. Java并发编程原理与实战十一:锁重入&自旋锁&死锁

热门文章

  1. python全栈开发 * 27知识点汇总 * 180710
  2. LINUX常用命令 --- 权限篇
  3. 20165311 ch02 课下作业
  4. RoR- Database setup& SQLite ... Migrations
  5. Vue Watch 的原理 和 $nextTick() 通俗理解
  6. pandas处理时间序列(1):pd.Timestamp()、pd.Timedelta()、pd.datetime( )、 pd.Period()、pd.to_timestamp()、datetime.strftime()、pd.to_datetime( )、pd.to_period()
  7. js中变量名加“-” new Vue()不执行
  8. VS2015 新建 ASP.NET Web应用程序, 此模板尝试加载程序集‘Microsoft.VisualStudio.Web.Project’, 解决方案
  9. Android-Gradle(一)
  10. Python 第五阶段 学习记录之----ORM