2 zgc sitech zgc_sitech 于 2013.10.10 17:02 提问

hive学习中碰到的错误

小弟初学hive,配置了mysql为元数据库后,然后新建了一个表test(id int,name string)
hive> show tables;
OK
test
Time taken: 1.759 seconds
hive> drop table test;
FAILED: Error in metadata: MetaException(message: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
NestedThrowables:
com.mysql.jdbc.exceptions.jdbc4.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)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
然后再执行show tables命令同样报以上错误,求大仙指点!!!

1个回答

zgc_sitech
zgc_sitech   2013.10.12 17:19
已采纳

已经解决了,是mysql的版本和驱动的版本不匹配导致的,我的mysql版本是5.6的,刚开始使用的驱动是5.1.18,这个版本还支持SQL_SELECT_LIMIT参数,但是mysql5.6已经抛弃了这个参数,所以会报上面错误,换成驱动5.1.26后解决。

Csdn user default icon
上传中...
上传图片
插入图片