打开beeline:
beeline
交互式登录
beeline> !connect jdbc:hive2://localhost:10000/default
Connecting to jdbc:hive2://localhost:10000/default
Enter username for jdbc:hive2://localhost:10000/default: lenmom
Enter password for jdbc:hive2://cdh-server2:10000/default: *****
Connected to: Apache Hive (version 2.3.4)
Driver: Hive JDBC (version 2.3.4)
Transaction isolation: TRANSACTION_REPEATABLE_READ
命令登录
beeline -u jdbc:hive2://127.0.0.1:10000 -n lenmom -p 123456