_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › HiveMySQL覃ろ

Contents

1 MySQL 覃ろ れ
2 谿瑚


1 MySQL 覃ろ れ #

1. mysql れ 覦
sudo apt-get install mysql-server mysql-client
/etc/init.d/mysqld start

2. mysql れ mysql 螻 覦 一危磯伎
mysql -u root -p
grant all privileges on *.* to huser@localhost identified by '9999' with grant option;
create database hive; 

3. mysql connector [http]れ企 mysql-connector-java-5.1.26.tar.gz
4. 豢 蠍
tar xzf mysql-connector-java-5.1.26.tar.gz

5. mysql-connector-java-5.1.26-bin.jar襯 HIVE_HOME/lib/ 覲旧

6. hive-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>
    <property>
      <name>javax.jdo.option.ConnectionURL</name>
      <value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
      <description>JDBC connect string for a JDBC metastore</description>
    </property>

    <property>
      <name>javax.jdo.option.ConnectionDriverName</name>
      <value>com.mysql.jdbc.Driver</value>
      <description>Driver class name for a JDBC metastore</description>
    </property>

    <property>
      <name>javax.jdo.option.ConnectionUserName</name>
      <value>huser</value>
      <description>username to use against metastore database</description>
    </property>


    <property>
      <name>javax.jdo.option.ConnectionPassword</name>
      <value>9999</value>
      <description>password to use against metastore database</description>
    </property> 
</configuration>

hwi蟯 豢螳
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>
    <property>
      <name>javax.jdo.option.ConnectionURL</name>
      <value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
      <description>JDBC connect string for a JDBC metastore</description>
    </property>

    <property>
      <name>javax.jdo.option.ConnectionDriverName</name>
      <value>com.mysql.jdbc.Driver</value>
      <description>Driver class name for a JDBC metastore</description>
    </property>

    <property>
      <name>javax.jdo.option.ConnectionUserName</name>
      <value>huser</value>
      <description>username to use against metastore database</description>
    </property>

    <property>
      <name>javax.jdo.option.ConnectionPassword</name>
      <value>9999</value>
      <description>password to use against metastore database</description>
    </property> 

    <property>
        <name>hive.hwi.listen.host</name>
        <value>0.0.0.0</value>
    </property>

    <property>
        <name>hive.hwi.listen.port</name>
        <value>9999</value>
    </property>

    <property>
        <name>hive.hwi.war.file</name>
        <value>/lib/hive-hwi-0.11.0.war</value>
    </property>
</configuration>   
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

伎 襷 螳語. 螳伎 願 覲企 企 螳 蟇磯Μ螳 螳讌蟾. 螳 蟇磯Μ螳 螳 谿語 蟆 讀螳 螳伎 . 螳 蠏手碓襴螻 手 誤 磯Μ 覲旧 螻煙朱 蟷伎. (豈覺)