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, 2019 in Big Data Hadoop by Nisha

edited May 30, 2019 by Gitika 2,284 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, 2019 by Gitika
• 65,770 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, 2019 in Big Data Hadoop by Jishnu
2,609 views
0 votes
1 answer

How to create hive table without location?

Hi@akhtar, We can create a hive table for ...READ MORE

answered Oct 16, 2020 in Big Data Hadoop by MD
• 95,460 points
1,182 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
• 26,740 points
1,773 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
• 69,220 points
2,556 views
+1 vote
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
• 11,380 points
11,078 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
• 11,380 points
2,575 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
109,076 views
–1 vote
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,350 points
4,643 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, 2019 in Big Data Hadoop by Gitika
• 65,770 points
1,096 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, 2019 in Big Data Hadoop by Gitika
• 65,770 points
621 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP