Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Cloudera Manager installation using custom database (mysql) - failed creating metastore

Highlighted

Cloudera Manager installation using custom database (mysql) - failed creating metastore

Explorer

I can't pass this stage if I use mysql as my custom database:

 

failed create Hive Metastore Database Tables, Specified key was too long; max key length is 1000 bytes (state=42000,code=1071)

 

Anybody encountered this? All ok if I use embedded database.

6 REPLIES 6
Highlighted

Re: Cloudera Manager installation using custom database (mysql) - failed creating metastore

New Contributor

Hello,

1. have you configured the Mysql Db with corresponding parameters for innoDB?

2. If yes, What is the default characterset that you choose while creating mysql DBs?

Best Regards,

SAM

Highlighted

Re: Cloudera Manager installation using custom database (mysql) - failed creating metastore

Explorer

Hi Sam,

 

Yes I did. I followed this link .. install mysql db, added the parameters in my.cnf, copy the connector, created the database.

 

http://www.cloudera.com/content/cloudera/en/documentation/archives/cloudera-manager-4/v4-5-1/Clouder...

 

I created the databse as per the documentation ..

 

mysql> create database hive DEFAULT CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on hive.* TO 'hive'@'%' IDENTIFIED BY 'hive_password';
Query OK, 0 rows affected (0.00 sec)

Re: Cloudera Manager installation using custom database (mysql) - failed creating metastore

Super Collaborator

wait... what... what version of CM are you installing, you are showing us a documentation link for 4.5.1

 

 

Highlighted

Re: Cloudera Manager installation using custom database (mysql) - failed creating metastore

Explorer

I'm installing version 5.4.

 

I was following this link at first,

 

http://www.cloudera.com/content/cloudera/en/documentation/core/latest/topics/cm_ig_mysql.html?scroll...

 

but on the db creation, i followed the 4.5.1 cause i wasn't sure what database to install.

Highlighted

Re: Cloudera Manager installation using custom database (mysql) - failed creating metastore

New Contributor

Just wanted to make sure what engine the metastore tables are in:

 

run this query in mysql db, connect as root:

 

SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES where TABLE_SCHEMA = 'dbname'
(Replace the dbname with metastore db name)

BR,

SAM

Highlighted

Re: Cloudera Manager installation using custom database (mysql) - failed creating metastore

New Contributor

If it shows the correct engine.  Lets try to change character set of metastore database to 'latin1' the default for mysql DB:

 

alter database <metastoreDB> character set latin1;

 

And try the installation.

 

BR

Sam.

Don't have an account?
Coming from Hortonworks? Activate your account here