hive的远程模式需要mysql数据库,需要安装mysql数据库,
创建mysql 数据库用于存储hive的原信息
create database hive DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
修改访问权限
grant all privileges on *.* to "root"@"%" identified by "root" with grant option;
刷新权限
flush privileges;
查看是否开启远程访问
select user,password,host from user;
mysql> select user,host from mysql.user;
+------+------------+
| user | host |
+------+------------+
| root | % |
| root | 127.0.0.1 |
| | bigdata111 |
| root | bigdata111 |
| | localhost |
| root | localhost |
+------+------------+
6 rows in set (0.00 sec)
解压hive软件,并且配置环境变量
tar -zxvf apache-hive-2.3.0-bin.tar.gz -C ~/training/
配置环境变量:
vi /etc/profile
export HIVE_HOME=/root/trainin