hive的连接方式(两种)

第一种 本地客户端连接

[root@linux01 hive-2.3.1]# bin/hive

第二种:远程连接hiveserver2

先启动hiveserver2,再通过beeline连接

beeline 

beeline> !connect jdbc:hive2://linux01:10000
Connecting to jdbc:hive2://linux01:10000

Enter username for jdbc:hive2://linux01:10000: root
Enter password for jdbc:hive2://linux01:10000: root

Connected to: Apache Hive (version 2.3.1)
Driver: Hive JDBC (version 2.3.1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://linux01:10000> 

或者

 beeline -u jdbc:hive2://localhost:10000 -n root

猜你喜欢

转载自blog.csdn.net/weixin_43648241/article/details/108846133