安装配置hadoop组件hive问题集锦
用了1天时间,才完成hive的安装配置,一:首先安装mysql
下载mysql for ubuntu版本,是deb版本
sudo apt-get libaio
sudo apt-get libmecab2
之后使用dpkg -i mysql一系列的deb文件
libmysql*
mysql-community*
mysql-client*
mysql-server*
查看whereis mysql,看到安装到了不同的路径
可执行文件/etc/bin,配置文件/etc/mysql/conf,等到
二、启动mysql
sudo service mysql status
sudo service mysql start
mysql -uroot -proot ;连接登录
修改密码
sudo mysqld-safe --skip-grant-tables &
use mysql;
update user set authentication_string=password('password') where user='root';这是个狠大的改变,因为5.7版本没有password子弹了
flush privileges;
grant all privileges on mysql.* to hive@localhost;
grant all on hive.* to hive@'%'> 三、下载hive2.1
tar -xvf apache-hive*****.tar.gz
mv 改变路径
chown修改所有者
chmod755
修改/conf/hive-env.sh
/conf/hive_site.xml
[*]
[*] hive.metastore.uris
[*] thrift://xxxxxxxx
[*] Thrift uri for the remote metastore. Used by metastore client to connect to remote metastore.
[*]
我不知道这个配置是干什么用的。果断清空value的值。再次运行show databases命令。成功!!!!
5)再次提醒读者朋友们:当你们的错误信息与上述错误相似时,请认真检查 hive.metastore.uris 的value 配置是否正确。建义新手不要配置。
javax.jdo.option.ConnectionURL
jdbc:mysql://10.1.195.50:3306/hivedb?createDatabaseIfNotExist=true&useUnicode=true&ssl=false
JDBC connect string for a JDBC metastore
javax.jdo.option.ConnectionDriverName
com.mysql.jdbc.Driver
Driver>
javax.jdo.option.ConnectionUserName
umobile
username to use against metastore database
javax.jdo.option.ConnectionPassword
umobile
password to use against metastore database
注意上面的联机字符串,&是用来解决ssl警告错误的
遇到Hive metastore database is not initialized. Please use schematool错误
先用命令schematool -dbType mysql -initSchema
然后启动hive即可
页:
[1]