#title Hive MySQL 메타스토어
[[TableOfContents]]
==== 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://www.mysql.com/downloads/connector/j/ 다운로드] attachment:HiveMySQL메타스토어/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 생성
{{{
javax.jdo.option.ConnectionURL
jdbc:mysql://localhost: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
huser
username to use against metastore database
javax.jdo.option.ConnectionPassword
9999
password to use against metastore database
}}}
hwi관련 추가
{{{
javax.jdo.option.ConnectionURL
jdbc:mysql://localhost: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
huser
username to use against metastore database
javax.jdo.option.ConnectionPassword
9999
password to use against metastore database
hive.hwi.listen.host
0.0.0.0
hive.hwi.listen.port
9999
hive.hwi.war.file
/lib/hive-hwi-0.11.0.war
}}}
==== 참고 ====
* http://bigmark.tistory.com/35