zoukankan      html  css  js  c++  java
  • MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for

    the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1

    完整报错信息

    2019-03-26 09:41:54,395 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] 
    [com.mchange.v1.db.sql.StatementUtils.attemptClose(StatementUtils.java:48)] - [WARN] Statement close FAILED.
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for 
    the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
    	at sun.reflect.GeneratedConstructorAccessor106.newInstance(Unknown Source)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    	at com.mysql.jdbc.Util.getInstance(Util.java:381)
    	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
    	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
    	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
    	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
    	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
    	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
    	at com.mysql.jdbc.ConnectionImpl.unsetMaxRows(ConnectionImpl.java:5349)
    	at com.mysql.jdbc.StatementImpl.realClose(StatementImpl.java:2258)
    	at com.mysql.jdbc.PreparedStatement.realClose(PreparedStatement.java:2650)
    	at com.mysql.jdbc.PreparedStatement.close(PreparedStatement.java:802)
    	at com.mchange.v1.db.sql.StatementUtils.attemptClose(StatementUtils.java:41)
    	at com.mchange.v2.c3p0.stmt.GooGooStatementCache.synchronousDestroyStatement(GooGooStatementCache.java:413)
    	at com.mchange.v2.c3p0.stmt.GooGooStatementCache.closeAll(GooGooStatementCache.java:351)
    	at com.mchange.v2.c3p0.impl.NewPooledConnection.closeAllCachedStatements(NewPooledConnection.java:598)
    	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:468)
    	at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:191)
    	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
    	at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
    	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
    

    mysql数据库版本为5.6

    项目中mysql驱动版本为5.1.6,但是mysql5.6已经抛弃了这个参数

    降低mysql驱动版本为5.1.31

  • 相关阅读:
    快速找到由程序员到CTO发展道路上的问路石
    从大师身上反思
    你真的了解企业虚拟化吗?
    “驱网核心技术丛书”创作团队访谈
    程序员到CTO需要准备什么
    深入搜索引擎的关键——索引
    程序员到CTO必须注意的几个关键点
    微软全球MVP教你如何规划程序人生
    “碟中碟”虚拟光驱软件开发者——万春 读《寒江独钓——Windows内核安全编程 》有感
    常用jar包之commonscollection使用
  • 原文地址:https://www.cnblogs.com/cosmosray/p/13268800.html
Copyright © 2011-2022 走看看