Hive 报错 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaExce

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message: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)

这里写图片描述

解决办法:

Hive 报错 FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaExce_第1张图片

更换新的 MySQL 驱动

hadoop是通过jdbc连接数据库,在连接数据库时候会发送测试语句SET OPTION SQL_SELECT_LIMIT=DEFAULT

这在mysql5.6以下版本是可以的 ,但是5.6不再支持SET OPTION SQL_SELECT_LIMIT=DEFAULT

下载地址:

https://dev.mysql.com/downloads/connector/j/5.1.html


1、使用hive OPTION SQL_SELECT_LIMIT=DEFAULT
http://blog.csdn.net/duyuanhai/article/details/78106984

2、ive的一个报错
http://java-doom.iteye.com/blog/1935228


你可能感兴趣的:(Hive,mysql,hive,sql)