码迷,mamicode.com
首页 > 系统相关 > 详细

Unknown system variable 'query_cache_size' 错误原因以及解决办法

时间:2019-06-30 22:04:58      阅读:1153      评论:0      收藏:0      [点我收藏+]

标签:and   dao   error   eclips   unknown   sele   错误提示   sse   exce   

Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown system variable ‘query_cache_size‘)
### The error may exist in file [/Volumes/mac/Eclipse Project/Tomcat_version/apache-tomcat-9.0.21/webapps/chuan_zang_help/WEB-INF/classes/cn/ydyfc/chuan_zang_help/mapper/AdminMapper.xml]
### The error may involve cn.ydyfc.chuan_zang_help.dao.AdminMapper.selectAllAdmins
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown system variable ‘query_cache_size‘)] with root cause
java.sql.SQLException: Unknown system variable ‘query_cache_size‘
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)

 

 

错误提示:Cannot create PoolableConnectionFactory (Unknown system variable ‘query_cache_size‘)

原因:由于mysql驱动包的版本过低导致这个问题的发生意思是query cache在MySQL5.7.20就已经过时了,而在MySQL8.0之后就已经被移除了。

我改成8以上才可以了。

Unknown system variable 'query_cache_size' 错误原因以及解决办法

标签:and   dao   error   eclips   unknown   sele   错误提示   sse   exce   

原文地址:https://www.cnblogs.com/tanglie/p/11111394.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!