Specified key was too long; max key length is 767 bytes This error is hive metadata mysql character set encoding problem
such as show create table PARTITIONS ;
utf-8 will Report the above error.
Change CHARSET=utf-8 to CHARSET=latin1;
alter table PARTITIONS convert to character set latin1;
So do a good job of setting the character set encoding at the beginning of hive database construction
alter database hivedb character set latin1;
In this way, everything will be fine, and then start the hive metastore service. All tables are encoded in latin1.