日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

使用mysql作為hive的元數(shù)據(jù)庫

系統(tǒng) 3585 0

  1.hive下載安裝
?
?  2.下載mysql安裝
?
?  3.以root用戶進(jìn)入mysql命令行:mysql -uroot -p(提示輸入密碼)
?
?  4.創(chuàng)建hive的元數(shù)據(jù)庫:create database metahive【元數(shù)據(jù)庫名metahive】
?
?  5.創(chuàng)建hive用戶:create user hive@'localhost' identified by 'hive'【mysql中為hive專用的user名:hive,密碼為:hive】
?
?  6.賦予權(quán)限:grant all privileges on metahive.* to hive;flush privileges;
?
?  7.登出root用戶:quit;
?
?  8.使用hive用戶登錄mysql:mysql -uhive -p(提示輸入密碼)
?
?  【登錄后,show databases;可以看到有metahive這一數(shù)據(jù)庫,OK!】
?
?  9.配置hive:【主要是hive-site.xml文件】
?
?  9.1.將hive的conf文件夾中的hive-default.xml.template文件拷貝為hive-site.xml文件:cp hive-default.xml.template hive-site.xml
?
?  9.2.配置hive-site.xml文件:vim hive-site.xml
?
?  需要修改的property有如下幾個:【由于hive默認(rèn)的元數(shù)據(jù)庫為其內(nèi)置的derby數(shù)據(jù)庫,要修改為mysql】
?
?  <property>
?
?  <name>javax.jdo.option.ConnectionURL</name>
?
?  <value>jdbc:mysql://localhost:3306/元數(shù)據(jù)庫名?createDatabaseIfNotExist=true</value>
?
?  <description>JDBCconnectstringforaJDBCmetastore</description>
?
?  </property>
?
?  <property>
?
?  <name>javax.jdo.option.ConnectionDriverName</name>
?
?  <value>com.mysql.jdbc.Driver</value>
?
?  <description>DriverclassnameforaJDBCmetastore</description>
?
?  </property>
?
?  <property>
?
?  <name>javax.jdo.option.ConnectionUserName</name>
?
?  <value>mysql中為hive專用的用戶名</value>
?
?  <description>usernametouseagainstmetastoredatabase</description>
?
?  </property>
?
?  <property>
?
?  <name>javax.jdo.option.ConnectionPassword</name>
?
?  <value>123456</value>
?
?  <description>passwordtouseagainstmetastoredatabase</description>
?
?  </property>
?
?  10.配置完后注意在/etc/profile(或者redhat OS下的。bash_profile和ubuntu OS下的。bashrc)中添加HIVE_HOME(hive安裝路徑下bin的上一層)
?
?  以上步驟的順序是沒有嚴(yán)格要求的,至此,算是安裝配置完畢,下面進(jìn)入測試階段
?
?  11.進(jìn)入hive cli:命令行輸入hive
?
?  12.在hive中建測試表test:create table test(id int,name string)row format delimited fields terminated by '\t' lines terminated by '\n' stored as textfile; 托福答案 ???? www.qcwyo68.com ?
?
?

使用mysql作為hive的元數(shù)據(jù)庫


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 承德市| 奈曼旗| 盘山县| 庆云县| 内丘县| 依兰县| 崇明县| 龙海市| 宁国市| 金湖县| 什邡市| 绩溪县| 镇远县| 林周县| 松溪县| 库尔勒市| 苍南县| 新乐市| 茶陵县| 弥勒县| 玉门市| 五华县| 双城市| 南丰县| 绥德县| 沂源县| 南雄市| 迁西县| 兴安盟| 临武县| 年辖:市辖区| 延边| 沙雅县| 福清市| 尚志市| 柯坪县| 景洪市| 阜新市| 甘南县| 临江市| 光山县|