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

posted @ 2019-05-16 15:52  CosmosRay  阅读(451)  评论(0编辑  收藏  举报