How to create initial database without using Hive schema tool?

0 votes

Can anyone explain how to create initial database without using Hive schema tool?

May 29 in Big Data Hadoop by Nisha

edited May 30 by Gitika 41 views

1 answer to this question.

0 votes

Hey,

If for some reason you decide not to use the schema tool, you can use the file below instead, 

 hive-schema-n.n.n.mysql.sql

That file is located in the /usr/lib/hive/scripts/metastore/upgrade/mysql/ directory.

Proceed as follows if you decide to use

 hive-schema-n.n.n.mysql.sql.

 If you are not using the Hive schema tool, you can use this:-

$ mysql -u root -p
Enter password:
mysql> CREATE DATABASE metastore;
mysql> USE metastore;
mysql> SOURCE /usr/lib/hive/scripts/metastore/upgrade/mysql/hive-schema-n.n.n.mysql.sql;

You also need a MySQL user account for Hive to use to access the metastore. It is very important to prevent this user account from creating or altering tables in the metastore database schema.

answered May 29 by Gitika
• 19,720 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to create a Hive Database and store it in HDFS?

You will have to exclusively mention the ...READ MORE

answered May 20 in Big Data Hadoop by Jishnu
24 views
0 votes
1 answer

How to create smaller table from big table in HIVE?

You could probably best use Hive's built-in sampling ...READ MORE

answered Sep 24, 2018 in Big Data Hadoop by digger
• 27,620 points
106 views
0 votes
1 answer

Hadoop: How to keep duplicates in Hive using collect_set()?

SELECT hash_id, COLLECT_LIST(num_of_cats) AS ...READ MORE

answered Nov 2, 2018 in Big Data Hadoop by Omkar
• 67,120 points
187 views
0 votes
1 answer

Hadoop Hive Hbase: How to insert data into Hbase using Hive (JSON file)?

You can use the get_json_object function to parse the ...READ MORE

answered Nov 15, 2018 in Big Data Hadoop by Omkar
• 67,120 points
406 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,070 points
2,039 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,070 points
192 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
10,395 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
762 views
0 votes
1 answer

How to create the Oozie DB using the 'ooziedb.sh' command line tool?

This is the command you can use: $ ...READ MORE

answered Jun 10 in Big Data Hadoop by Gitika
• 19,720 points
20 views
0 votes
1 answer

How to create Hive tables that can be partitioned Using HiveQL?

Hey, You can create a Hive table using ...READ MORE

answered Jun 26 in Big Data Hadoop by Gitika
• 19,720 points
11 views