hive mysql远程模式_Hive远程模式启动
1、配置遠(yuǎn)程服務(wù)器MYSQL,并保證遠(yuǎn)程可以訪問
2、$HIVE_HOME/conf/hive-site.xml 關(guān)鍵配置如下
hive.metastore.local
false
controls whether to connect to remove metastore server or open a new metastore server in Hive Client JVM
javax.jdo.option.ConnectionURL
jdbc:mysql://192.168.17.133:3306/hive?createDatabaseIfNotExist=true
JDBC connect string for a JDBC metastore
javax.jdo.option.ConnectionDriverName
com.mysql.jdbc.Driver
Driver class name for a JDBC metastore
javax.jdo.option.ConnectionUserName
root
username to use against metastore database
javax.jdo.option.ConnectionPassword
chenbo
password to use against metastore database
hive.metastore.uris
thrift://127.0.0.1:9083
3、mysql-connector-java-5.1.12.jar復(fù)制到$HIVE_HOME/lib下
4、$HIVE_HOME/bin/hive --service metastore --開啟metastore服務(wù) 默認(rèn)端口用的是9083
5、$HIVE_HOME/bin/hive --service hiveserver --開啟hiveserver服務(wù) JDBC端口是10000?? JAVA可以連接
6、在本地啟動$HIVE_HOME/bin/hive?? hive>show tables;
7、登錄遠(yuǎn)程hive數(shù)據(jù)庫,如果有元數(shù)據(jù),說明完全啟動成功
總結(jié)
以上是生活随笔為你收集整理的hive mysql远程模式_Hive远程模式启动的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机类说课比赛视频,全国“xx杯”计算
- 下一篇: 怎么实现java和数据库的链接_JAVA