Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hive Meta store - mysql connection issue org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version. *** schemaTool failed ***

avatar

I am struggling with Hive meta store connection to mysql db. Everything is done by Ambari (latest version). everything is working fine except Hive Metastore crashes periodically and recovers. I can do show databases; show tables; create table but /usr/hdp/current/hive-client/bin/schematool -dbType mysql -initSchema doesnt work. Set up of mysql is complete. addedstderr.txt

1 ACCEPTED SOLUTION

avatar

Thanks for your answer. I could not figure out problem. All the mySql permissions were there. I simply had to reinstall and it worked like a charm. I guess it is goign to be a mystery, forever.

View solution in original post

2 REPLIES 2

avatar
Super Guru
@Cruz DSouza

Let's start with the following. Check user permissions in your MySQL.

login to MySQL shell and then see permissions in user table for user "hive".

SELECT User, host from MySQL.user where user = 'hive'

or try to find permissions for user hive and which hosts it can log in from.

SHOW GRANTS for 'hive'@'%';

If you don't see permissions for user hive, specially for the host you are logging in from, you can run the following. Notice, this statement below, gives hive permission to run from any client host. You might not need this and in that case, customize according to your requirements

GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'%';

avatar

Thanks for your answer. I could not figure out problem. All the mySql permissions were there. I simply had to reinstall and it worked like a charm. I guess it is goign to be a mystery, forever.