hive+mysql整合时出现 Column length too big for column‘text’ use BLOB or TEXT instead

安装hive时,一定要注意hadoop和hive的版本问题


com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Column length too big for column 'PARAM_VALUE' (max = 16383); use BLOB or TEXT instead

这是因为mysql是使用utfmb4编码的,导致该字段在编码的时候内容过长(gbk使用双字节,utf使用三字节,)


可以使用show variables like '%char%'查看系统的编码


alter database 数据库名 character set gbk;(修改某个数据库的编码格式为gbk或者latin1)

flush privileges;







你可能感兴趣的:(hadoop)