hive 安装mysql,启动hive异常和建表时候异常

一、启动hive异常

java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
 

linux里安装的mysql 版本是5.5

需要在 /etc/my..cnf 配置文件里面添加   binlog_format=row

然后重启mysql服务   sudo service mysql restart

再次启动,OK了

[atguigu@hadoop103 hive-1.2.1]$ bin/hive

Logging initialized using configuration in jar:file:/opt/module/hive-1.2.1/lib/hive-common-1.2.1.jar!/hive-log4j.properties
hive> 

5.6版本后不会遇到这个问题

二、建表时候异常

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
修改Metastore数据库的编码

1、登录mysql,修改metastore库的字符集为latin1

2、但这种metastore这个库里面之前建的表还是utf8,建议直接把这库删了,手动创建这个metastore这个库指定为latain1.

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值