'Query_cache_size' cause of the error Unknown system variable and solutions

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')

The reason: Because the driver package mysql version is too low lead to the meaning of this problem is in the query cache MySQL5.7.20 already out of date, and after MySQL8.0 has been removed.

I changed it to 8 or more before it.

Guess you like

Origin www.cnblogs.com/tanglie/p/11111394.html