java.sql.SQLException:未知的系统变量'OPTION'

时间:2016-04-15 13:45:11

标签: java mysql hadoop ambari

我正在安装带有Ambari服务器的MYSQL,以便在ubuntu上安装hadoop。

我从Xampp安装了My Sql并且工作正常。

设置的`Option关键字已从My SQL 5.6版本中删除,而mariaDB(随xampp一起提供)与此一致。

该网站显示它与MySQL 5.6版本兼容,应该没问题。

回应the only relevant link I found

当我检查我的sql版本时:

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

这就是我得到的。我相信链接中提到的问题不是这里的情况吗?

当我尝试使用ambari服务器注册我的主机时,它会抛出这个错误:

我试过更换连接器,版本和我能做的一切。但我一直收到这个错误。

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

2 个答案:

答案 0 :(得分:4)

我遇到了同样的问题并更新了mysql驱动程序版本修复它。

答案 1 :(得分:0)

我也遇到了同样的问题,我还用jre和Netbeans重新安装了新版本的xampp,jdk,然后问题就解决了