Hive JDBC访问

启动 hiveserver2 服务

hiveserver2

启动 beeline

beeline
[root@hadoop101 ~]# beeline
Beeline version 1.2.1 by Apache Hive
beeline> 

连接 hiveserver2

!connect jdbc:hive2://hadoop101:10000
beeline> !connect jdbc:hive2://hadoop101:10000
Connecting to jdbc:hive2://hadoop101:10000
Enter username for jdbc:hive2://hadoop101:10000: root
Enter password for jdbc:hive2://hadoop101:10000: ******
Connected to: Apache Hive (version 1.2.1)
Driver: Hive JDBC (version 1.2.1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://hadoop101:10000> show databases;
+----------------+--+
| database_name  |
+----------------+--+
| default        |
| ylj_test       |
+----------------+--+
2 rows selected (1.828 seconds)
0: jdbc:hive2://hadoop101:10000> 

Hive JDBC访问_第1张图片

你可能感兴趣的:(Hive,Hive学习笔记)