命令

  1. nohup hive --service hiveserver2 &

hive默认账号密码

如果没进行特殊设置的话, hive默认账号密码是 NONE

使用beeline进行连接

打开另外一个crt终端

  1. [root@zjj101 ~]# beeline
  2. Beeline version 1.2.1 by Apache Hive
  3. beeline> !connect jdbc:hive2://ip:10000/default
  4. Connecting to jdbc:hive2://ip:10000/default
  5. Enter username for jdbc:hive2://ip:10000/default: NONE
  6. Enter password for jdbc:hive2://ip:10000/default: ****
  7. Connected to: Apache Hive (version 1.2.1)
  8. Driver: Hive JDBC (version 1.2.1)
  9. Transaction isolation: TRANSACTION_REPEATABLE_READ
  10. 0: jdbc:hive2://ip:10000/default>