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以上才可以了。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。