1、修改hive-site.xml配置文件
<!-- jdbc连接URL --> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://hadoop102:3306/metastore?useSSL=false&useUnicode=true&characterEncoding=UTF-8</value> </property>
2、登录mysql,选择matestore库(就是hive存储元数据的数据库)
(1)修改表字段注解和表注解 alter table COLUMNS_V2 modify column COMMENT varchar(256) character set utf8; alter table TABLE_PARAMS modify column PARAM_VALUE varchar(4000) character set utf8; (2)修改分区字段注解 alter table PARTITION_PARAMS modify column PARAM_VALUE varchar(4000) character set utf8; alter table PARTITION_KEYS modify column PKEY_COMMENT varchar(4000) character set utf8; (3)修改索引注解 alter table INDEX_PARAMS modify column PARAM_VALUE varchar(4000) character set utf8;
3、重启metastore和Hiveserver2服务(重启Hive)