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 683 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,870 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
519 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 15, 2020 in Big Data Hadoop by MD
• 95,060 points
47 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,700 points
730 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,090 points
973 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
6,845 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
1,095 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
48,262 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,390 points
2,596 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,870 points
280 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,870 points
89 views