_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
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

磯Μ 襴 螳 螻 覿襴 覃 企 豺蟲螳 螻 企 螳 蠏碁 瑚蟯螻襯 讀ろ. (覿 覈)