赞
踩
前提先要启动hiveserver2
,不启动怎么连接呢.
hive --service hiveserver2 &
先登录beeline
,进入beeline
的命令行环境,然后连接
[root@mypc01 conf]# beeline
beeline> !connect jdbc:hive2://192.168.xx.101:10000
Connecting to jdbc:hive2://192.168.xx.101:10000
Enter username for jdbc:hive2://192.168.xx.101:10000: root
Enter password for jdbc:hive2://192.168.xx.101:10000: ******
Connected to: Apache Hive (version 1.1.0-cdh5.13.2)
Driver: Hive JDBC (version 1.1.0-cdh5.13.2)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://192.168.xx.101:10000> show databases;
INFO : Compiling command(queryId=root_20210103143131_e7b2263c-06d3-4824-b602-c46f599f7978): show databases;
+----------------+--+
| database_name |
+----------------+--+
| default |
+----------------+--+
一步到位
beeline -u jdbc:hive2://192.168.xx.101:10000 -n root
hiveserver2
beeline
连接hive
有两种方式,第二种简单些Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。