zoukankan      html  css  js  c++  java
  • mysql版本低报的错

    详细错误:

     1 java.sql.SQLException: Unknown system variable 'query_cache_size'
     2     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:959)
     3     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
     4     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
     5     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
     6     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
     7     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
     8     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2504)
     9     at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1370)
    10     at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3861)
    11     at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3289)
    12     at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2298)
    13     at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2084)
    14     at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795)
    15     at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
    16     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    17     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    18     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    19     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    20     at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
    21     at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)
    22     at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327)
    23     at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
    24     at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
    25     at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
    26     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
    27     at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
    28     at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
    29     at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
    30     at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
    31     at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

    原因:mysql驱动版本过低,更换驱动版本

     <!-- mysql -->
     <dependency>
         <groupId>mysql</groupId>
         <artifactId>mysql-connector-java</artifactId>
         <version>8.0.16</version>
     </dependency>
  • 相关阅读:
    c# 网络编程
    .net基础------抽象类和接口区别
    自己开发插件-------- 待续...........
    js 学习笔记 (this ,扩展方法,匿名函数)
    meta
    微信公众号支付接口-JSAPI
    跨境电商-311xml报文生成 更新到2018-10
    MooTools 异步请求验证
    微信JS-SDK 接口调用与 php 遇到的坑
    php 与 jquery中$.post()与attr()方法的简单实例 amaze modal 模态窗口
  • 原文地址:https://www.cnblogs.com/maigy/p/12230823.html
Copyright © 2011-2022 走看看