Support Questions
Find answers, ask questions, and share your expertise

Hive error in ambari

Hive error in ambari

Explorer
1 REPLY 1

Re: Hive error in ambari

Mentor

@Manoj690 

The error you are encountering is during the Ambari UI configuration of hivemetastore.  I think in the Ambari UI you chose  the New MYSQL instead of Existing MySQL 

Hive_DB.PNG

 

Did you pre-create the following databases

  • Hive
  • Oozie,
  • Ranger
  • Rangerkms

In your previous thread you already did the below steps to resolve the ambari startup issue.


# ambari-server setup --jdbc-db=mysql --jdbc-driver=/path/to/mysql/mysql-connector-java.jar

 

That above ensures and confirms that your MySQL database is well configured.

Now you have the option to pre-create on create the other databases before or during the setup I al^ways prefer the latter, so I will advise you to open up the Linux CLI  and follow the below steps for simplicity I have used a simple password! Always harden your password in production

 

The assumption here is that
hostname = gaian-lap386.com
password = welcome1
username and password = hive


# mysql -u root -pwelcome1
CREATE USER 'hive'@'localhost' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO '[HIVE_USER]'@'localhost';
CREATE USER 'hive'@'%' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%';
CREATE USER 'hive'@'gaian-lap386.com' IDENTIFIED BY 'hive';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'gaian-lap386.com';
FLUSH PRIVILEGES;

 

The above will create a hive database name hive with user and password [hive], you can use the same script above to create the other databases by replacing hive with e.g oozie,ranger,rangerkms

 

The values above will appear in the Ambari UI when you get to the Hive/Ranger/oozie/rangerkms  database config  see screenshot, most will be prefilled you will need to test the connection to validate the values are correct if no readjust I have never found an issue on this part


HiveMetastore.PNG

 

Just do the same of all the other databases.