Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

java.sql.SQLException: Unknown system variable 'OPTION'

Highlighted

java.sql.SQLException: Unknown system variable 'OPTION'

Expert Contributor

I am installing MYSQL with Ambari server for hadoop installation on ubuntu.

I have My Sql installed from Xampp and works fine.

The set `Option keyword has been removed from My SQL 5.6 version and mariaDB (comes with xampp) is consistent with that.

The website shows it is compatible with MySQL 5.6 version which should be fine.

In response to the only relevant link I found,

when I check for my sql version:

mysql -v
The program 'mysql' can be found in the following packages:* mysql-client-core-5.6* mariadb-client-core-10.0

This is what I get. I believe the problem mentioned in the link is not the case here then?

When I try to register my host with ambari server, it throws this errror:

I have tried replacing connectors, versions and everything I could. But I keep getting this error.

java.sql.SQLException:Unknown system variable 'OPTION'
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
    at com.mysql.jdbc.Connection.unsetMaxRows(Connection.java:5867)
    at com.mysql.jdbc.Statement.realClose(Statement.java:2070)
    at com.mysql.jdbc.PreparedStatement.realClose(PreparedStatement.java:2204)
    at com.mysql.jdbc.PreparedStatement.close(PreparedStatement.java:695)
    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
5 REPLIES 5
Highlighted

Re: java.sql.SQLException: Unknown system variable 'OPTION'

Cloudera Employee

What is the mysql jdbc driver version in use here ? Have you tried using mysql-connector-java-5.1.35.zip or later JDBC driver as reccomended ?

http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.0/bk_command-line-installation/content/meet-mi...

Highlighted

Re: java.sql.SQLException: Unknown system variable 'OPTION'

Expert Contributor

@simran kaur

@thejas

I found that is the mariadb not support 'set option xxx=value',but mysql support,So I think must use MySQL but not mariadb can reslove the problem

Highlighted

Re: java.sql.SQLException: Unknown system variable 'OPTION'

Cloudera Employee

I believe newer version of the jdbc driver for mariadb with HiveServer2/Metastore should solve the problem for it as well. Have you tried that ?

Highlighted

Re: java.sql.SQLException: Unknown system variable 'OPTION'

Expert Contributor

I use mariadb 10.2.4 and mysql 5.7,both told me that failed,and the mysql-connector version is 5.1.37.

And I run the "set option" in the mysql console,it told the same result.

I search the mysql official document,it tolds that the set

option is not support from mysql version 5.6

Highlighted

Re: java.sql.SQLException: Unknown system variable 'OPTION'

Expert Contributor

the offical website link https://bugs.mysql.com/bug.php?id=66765

Don't have an account?
Coming from Hortonworks? Activate your account here