- Create /usr/local/hive/conf/hive-site.xml
https://gist.github.com/igorbarinov/569f0440bf26f7ddf15f
- Add HADOOP_USER_CLASSPATH_FIRST to ~/.profile
export HADOOP_USER_CLASSPATH_FIRST=true
And source it
. ~/.profile
- Install MySQL
sudo apt-get install mysql-server
- Install Java Connector
sudo apt-get install libmysql-java
- Copy Java Connector to Hive Libs
cp /usr/share/java/mysql* /usr/local/hive/lib
- Set up MySQL
mysql -u root -p
mysql> CREATE DATABASE metastore;
mysql> USE metastore;
- Setup user account
mysql> CREATE USER 'hive'@'%' IDENTIFIED BY 'mypassword';
mysql> GRANT all on *.* to 'hive'@localhost identified by 'mypassword';
mysql> flush privileges;
mysql> SOURCE /usr/local/hive/scripts/metastore/upgrade/mysql/hive-schema-1.2.0.mysql.sql;
- Run hive
hive