1. Install MySQLsudoapt-getinstallmysql-server. sudoapt-getinstallmysq may also need to be installed. First, use root login to grant the hive user the permission $ mys
1. install MySQL sudo apt-get install mysql-server and sudo apt-get install mysq. First, use root login to grant permissions to hive users $ mys.
1. Install MySQL
Sudo apt-get install mysql-server
And possibly
Sudo apt-get install mysq
First, use root login to grant permissions to hive users.
$ Mysql-u root-p111111
Mysql> grant all privileges on *. * TO hive @ localhost identified by "hive123 ";
2. Install hive;
$ Tar zxvf hive-0.8.1.tar.gz
Add in/etc/profile;
Export Hadoop_HOME =/home/sina/hadoop/
Export HIVE_HOME =/home/sina/hive/
Export PATH = $ PATH: $ HADOOP_HOME/bin: $ HIVE_HOME/bin
./Etc/profile takes effect (use a space between. and/etc/profile)
Start hive. You can use it ;,
Hive> create table hive1 (id int, name string) row format delimited fields terminated by '\ T ';
OK
Time taken: 10.865 seconds
Hive> show tables;
OK
Hive1
Time taken: 0.586 seconds
Hive> desc hive1;
OK
Id int
Name string
Time taken: 0.317 seconds
Hive> show tables;
OK
Hive1
Time taken: 0.182 seconds
Hive>
3, copy the mysql-connector-java-5.1.13.jar to the lib directory of hive
,