Get the App
SLTechnology News&Howtos  ›  Database  › 

MySQL reports an error MySQL server syntax to use near & # 039 what about option SQL_SELECT_LIMIT=DEFAULT'

Shulou Source: shulou.com Published: 2022-05-31 15:28:18 10月03日 Update

This article mainly introduces the MySQL error MySQL server syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' how to do, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

In the application of hive, You have an error in your SQL syntax occurs when the following error occurs Check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' is caused by a mismatch between the version of mysql and the version of the driver. My mysql version is 5.6, and the driver I started using is mysql-connector-java-5.0.5-bin.jar, but mysql5.6 has discarded this parameter, so it will report the above error and change it to driver mysql-connector-java-5.1.31-bin.jar.

Solution:

Download driver:

Http://dev.mysql.com/downloads/connector/j/

Select platform, download (mysql-connector-java-5.1.31.tar.gz)

Decompress 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 2000 ms (attempt 8 of 10) with error: javax.jdo.JDODataStoreException: 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 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. (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. (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.$Proxy18.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 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 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. (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. (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.$Proxy18.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)

Thank you for reading this article carefully. I hope the article "MySQL error reporting MySQL server syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT'" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Articles drivers versions what to do errors values interests parameters at the same time platforms solutions information channels channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Xiaomi Shulou Information MariaDB Huawei