1.Download hive package and uncompress it.
2.Create hive-site.xml under conf path, config params like that:
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>111111</value>
</property>
</configuration>
3. Edit ~/.bashrc, add hive path.
4.Execute hive, then you will entrance hive mode, then you can create table, load data and so on.
some comands like:
hive> create table user (userid int,username string,userage int,usersex string) row format delimited fields terminated by ',';
hive> show tables;
hive> desc user;
hive> load data local inpath '/data' overwrite into table user;
hive> select * from user;
5.You should use mysql-connector-java-**.jar package to connect to mysql, so you need download and put it to /hive/lib path.