hive 多用户访问模注意问题
2019-04-14 21:51发布
生成海报
首先是安装mysql - 安装mysql数据库及客户端
yum install mysql-serveryum install mysqlservicemysqld start 步骤一: yum -y install mysql-server 步骤二:service mysqld start 步骤三:mysql -u root -p
Enter password: (默认是空密码,按enter) mysql > CREATE USER 'hive'@'%' IDENTIFIED BY 'hive'; mysql > GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%' WITH GRANT OPTION; mysql > flush privileges; mysql > exit;2.配置server hive-site.xml hive.metastore.warehouse.dir /user/hive/warehouse javax.jdo.option.ConnectionURL jdbc:mysql://192.168.57.6:3306/hive?createDatabaseIfNotExist=true javax.jdo.option.ConnectionDriverName com.mysql.jdbc.Driver javax.jdo.option.ConnectionUserName root javax.jdo.option.ConnectionPassword 123456 2.客户端配置: hive-site.xml hive.metastore.warehouse.dir /user/hive/warehouse hive.metastore.local false hive.metastore.uris thrift://192.168.57.5:9083 3.首先是测试本地:./bin hive
上面出现异常:将相应的mysql-connector-java-5.132.bin.jar拷贝到 apache-hive-1.2.1-bin/lib4.再有异常就是jline..class 找不到,这时按下面要求去做:
5.首先是启动server 端: hive --service metastore

启动后客户端去访问:
注意:注意! 多用户模式是先启动用hive –service metastoreserver 后,在用客户端去访问;在服务器上.hive 启动的是本地模式,新建的表和客户建立的表,不会共享
参考博客:http://www.cnblogs.com/zlslch/p/6025410.html
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮