一、启动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.
扫描二维码关注公众号,回复:
5545920 查看本文章