10. Troubleshooting Hive

MySQL is the default database used by the Hive metastore. Depending on several factors, such as the version and configuration of MySQL, Hive developers may encounter an error message similar to the following:

An exception was thrown while adding/validating classes) : Specified key was too long; max key length is 767 bytes 

Administrators can resolve this issue by altering the Hive metastore database to use the Latin1 character set, as shown in the following example:

mysql> ALTER DATABASE <metastore_database_name> character set latin1;