Bad SQL grammar exception during Hybris Initialization

706 views Asked by At

I am getting exceptions while trying to initialize the Hybris System.

[java] ERROR 2020-09-26 01:24:20,025 [main] [DefaultDbScriptsExecutor] problem executing sql [reason: StatementCallback; bad SQL grammar [ CREATE INDEX addressIdx_12 ON addresses (p_email, p_country, p_postalcode, p_duplicate, TypePkString, OwnerPkString, p_original, createdTS, p_phone1, p_lastname)]; nested exception is java.sql.BatchUpdateException: Specified key was too long; max key length is 3072 bytes]

Can somebody help me out on this.

2

There are 2 answers

0
mkysoft On

Your db has limit for key length as 3072. My knowledge there is no way to increase it for InnoDB.

If your columns collations are correct you need to remove some columns from this index.

0
Raushan Kumar On

MySql index key length of 3072 bytes so it's better to create more than one index with a combination of your choice attribute then it should work.