使用Beeline连接Hive
注意:
!connect jdbc:hive2://node04:10000 node04节点开启hiveserver2角色,不然会报连接失败
客户端进入beeline并连接:
[root@node03 ~]# beeline
Beeline version 1.2.1 by Apache Hive
beeline> !connect jdbc:hive2://node04:10000
Connecting to jdbc:hive2://node04:10000 Enter username for jdbc:hive2://node04:10000: root
Enter password for jdbc:hive2://node04:10000: ******
Connected to: Apache Hive (version 1.2.1) Driver:
Hive JDBC (version 1.2.1) Transaction isolation: TRANSACTION_REPEATABLE_READ 0: jdbc:hive2://node04:10000>
退出连接 0: jdbc:hive2://node04:10000> !quit
原文链接:https://blog.csdn.net/paulfrank_zhang/article/details/80735633