MySQL error MySQL server syntax to use near ' OPTION sql_select_limit=default '

Source: Internet
Author: User
Tags auth mysql version

In the application of hive, the following error occurred when you had an "error" in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use-near ' OPTION Sql_select_limit=d Efault ' is caused by a mismatch between the MySQL version and the driver version, My MySQL version is 5.6, the first use of the driver is Mysql-connector-java-5.0.5-bin.jar, but mysql5.6 has abandoned this parameter, so will report the above error, replaced by the driver Mysql-connector-java-5.1.31-b In.jar after the resolution.

Solution:

Download driver:
http://dev.mysql.com/downloads/connector/j/
Select Platform, download (mysql-connector-java-5.1.31.tar.gz)
Unzip after download
TAR-XVF Mysql-connector-java-5.1.31.tar
CD mysql-connector-java-5.1.31
CP mysql-connector-java-5.1.31-bin.jar/usr/local/hive/lib/

Retrying Hmshandler after MS (attempt 8 of ten) with Error:javax.jdo.JDODataStoreException:You has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use-near ' OPTION Sql_select_limit=d Efault ' at line 1

At Org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException (nucleusjdohelper.java:451)

At Org.datanucleus.api.jdo.JDOPersistenceManager.getDataStoreConnection (jdopersistencemanager.java:2259)

At Org.apache.hadoop.hive.metastore.MetaStoreDirectSql.getProductName (metastoredirectsql.java:155)

At Org.apache.hadoop.hive.metastore.MetaStoreDirectSql.determineDbType (metastoredirectsql.java:146)

At Org.apache.hadoop.hive.metastore.metastoredirectsql.<init> (metastoredirectsql.java:120)

At Org.apache.hadoop.hive.metastore.ObjectStore.initialize (objectstore.java:295)

At org.apache.hadoop.hive.metastore.ObjectStore.setConf (objectstore.java:258)

At org.apache.hadoop.util.ReflectionUtils.setConf (reflectionutils.java:73)

At Org.apache.hadoop.util.ReflectionUtils.newInstance (reflectionutils.java:133)

At Org.apache.hadoop.hive.metastore.rawstoreproxy.<init> (rawstoreproxy.java:56)

At Org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy (rawstoreproxy.java:65)

At Org.apache.hadoop.hive.metastore.hivemetastore$hmshandler.newrawstore (hivemetastore.java:579)

At Org.apache.hadoop.hive.metastore.hivemetastore$hmshandler.getms (hivemetastore.java:557)

At Org.apache.hadoop.hive.metastore.hivemetastore$hmshandler.get_database_core (HiveMetaStore.java:933)

At Org.apache.hadoop.hive.metastore.hivemetastore$hmshandler.create_database (hivemetastore.java:876)

At Sun.reflect.GeneratedMethodAccessor8.invoke (Unknown Source)

At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:43)

At Java.lang.reflect.Method.invoke (method.java:606)

At Org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke (retryinghmshandler.java:102)

At Com.sun.proxy. $Proxy 18.create_database (Unknown Source)

At Org.apache.hadoop.hive.metastore.api.thrifthivemetastore$processor$create_database.getresult ( thrifthivemetastore.java:8519)

At Org.apache.hadoop.hive.metastore.api.thrifthivemetastore$processor$create_database.getresult ( thrifthivemetastore.java:8503)

At Org.apache.thrift.ProcessFunction.process (processfunction.java:39)

At Org.apache.hadoop.hive.metastore.tugibasedprocessor$1.run (tugibasedprocessor.java:110)

At Org.apache.hadoop.hive.metastore.tugibasedprocessor$1.run (tugibasedprocessor.java:106)

At java.security.AccessController.doPrivileged (Native Method)

At Javax.security.auth.Subject.doAs (subject.java:415)

At Org.apache.hadoop.security.UserGroupInformation.doAs (usergroupinformation.java:1671)

At Org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process (tugibasedprocessor.java:118)

At Org.apache.thrift.server.tthreadpoolserver$workerprocess.run (tthreadpoolserver.java:285)

At Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1145)

At Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:615)

At Java.lang.Thread.run (thread.java:745)

Nestedthrowablesstacktrace:

Com.mysql.jdbc.exceptions.MySQLSyntaxErrorException:You has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use-near ' OPTION Sql_select_limit=d Efault ' at line 1

At Com.mysql.jdbc.SQLError.createSQLException (sqlerror.java:936)

At Com.mysql.jdbc.MysqlIO.checkErrorPacket (mysqlio.java:2941)

At Com.mysql.jdbc.MysqlIO.sendCommand (mysqlio.java:1623)

At Com.mysql.jdbc.MysqlIO.sqlQueryDirect (mysqlio.java:1715)

At Com.mysql.jdbc.Connection.execSQL (connection.java:3243)

At Com.mysql.jdbc.Connection.execSQL (connection.java:3172)

At Com.mysql.jdbc.Statement.executeQuery (statement.java:1166)

At Com.mysql.jdbc.Connection.getTransactionIsolation (connection.java:3805)

At Com.jolbox.bonecp.ConnectionHandle.getTransactionIsolation (connectionhandle.java:825)

At Org.datanucleus.store.rdbms.connectionfactoryimpl$managedconnectionimpl.getconnection ( connectionfactoryimpl.java:444)

At Org.datanucleus.store.rdbms.connectionfactoryimpl$managedconnectionimpl.getxaresource ( connectionfactoryimpl.java:378)

At Org.datanucleus.store.connection.ConnectionManagerImpl.allocateConnection (connectionmanagerimpl.java:328)

At Org.datanucleus.store.connection.AbstractConnectionFactory.getConnection (abstractconnectionfactory.java:94)

At Org.datanucleus.store.rdbms.RDBMSStoreManager.getNucleusConnection (rdbmsstoremanager.java:1357)

At Org.datanucleus.api.jdo.JDOPersistenceManager.getDataStoreConnection (jdopersistencemanager.java:2245)

At Org.apache.hadoop.hive.metastore.MetaStoreDirectSql.getProductName (metastoredirectsql.java:155)

At Org.apache.hadoop.hive.metastore.MetaStoreDirectSql.determineDbType (metastoredirectsql.java:146)

At Org.apache.hadoop.hive.metastore.metastoredirectsql.<init> (metastoredirectsql.java:120)

At Org.apache.hadoop.hive.metastore.ObjectStore.initialize (objectstore.java:295)

At org.apache.hadoop.hive.metastore.ObjectStore.setConf (objectstore.java:258)

At org.apache.hadoop.util.ReflectionUtils.setConf (reflectionutils.java:73)

At Org.apache.hadoop.util.ReflectionUtils.newInstance (reflectionutils.java:133)

At Org.apache.hadoop.hive.metastore.rawstoreproxy.<init> (rawstoreproxy.java:56)

At Org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy (rawstoreproxy.java:65)

At Org.apache.hadoop.hive.metastore.hivemetastore$hmshandler.newrawstore (hivemetastore.java:579)

At Org.apache.hadoop.hive.metastore.hivemetastore$hmshandler.getms (hivemetastore.java:557)

At Org.apache.hadoop.hive.metastore.hivemetastore$hmshandler.get_database_core (HiveMetaStore.java:933)

At Org.apache.hadoop.hive.metastore.hivemetastore$hmshandler.create_database (hivemetastore.java:876)

At Sun.reflect.GeneratedMethodAccessor8.invoke (Unknown Source)

At Sun.reflect.DelegatingMethodAccessorImpl.invoke (delegatingmethodaccessorimpl.java:43)

At Java.lang.reflect.Method.invoke (method.java:606)

At Org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke (retryinghmshandler.java:102)

At Com.sun.proxy. $Proxy 18.create_database (Unknown Source)

At Org.apache.hadoop.hive.metastore.api.thrifthivemetastore$processor$create_database.getresult ( thrifthivemetastore.java:8519)

At Org.apache.hadoop.hive.metastore.api.thrifthivemetastore$processor$create_database.getresult ( thrifthivemetastore.java:8503)

At Org.apache.thrift.ProcessFunction.process (processfunction.java:39)

At Org.apache.hadoop.hive.metastore.tugibasedprocessor$1.run (tugibasedprocessor.java:110)

At Org.apache.hadoop.hive.metastore.tugibasedprocessor$1.run (tugibasedprocessor.java:106)

At java.security.AccessController.doPrivileged (Native Method)

At Javax.security.auth.Subject.doAs (subject.java:415)

At Org.apache.hadoop.security.UserGroupInformation.doAs (usergroupinformation.java:1671)

At Org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process (tugibasedprocessor.java:118)

At Org.apache.thrift.server.tthreadpoolserver$workerprocess.run (tthreadpoolserver.java:285)

At Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1145)

At Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:615)

At Java.lang.Thread.run (thread.java:745)

MySQL error MySQL server syntax to use near ' OPTION sql_select_limit=default '

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.