hive乱码问题

在线安装mysql的修改方式
①修改编码,设置为utf-8

在 mysql 配置文件/etc/my.cnf(不需要拷贝)中[mysqld]的下面增加以下内容

init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake

在这里插入图片描述
②重启mysqld服务

service mysqld restart

③ 和离线方式一样验证编码是否确实修改;

show variables like 'char%';

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/w13716207404/article/details/103324391