MySQL Database Migration fails with Specified key was too long max key length is 1000 bytes

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Getting error below inside fisheye-debug.log when migrating database to MySQL server:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 1000 bytes
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

Cause

There is a known bug with MySQL related to MyISAM, the UTF8 character set and indexes that you can check here.

Resolution

  1. Make sure MySQL is configured with the InnoDB storage engine.
  2. Change the storage engine used by default so that new tables will always be created appropriately:

    set GLOBAL storage_engine='InnoDb';

    For MySQL 5.6 and later, use the following:

    mysql> SET GLOBAL default_storage_engine = 'InnoDB';
  3. And finally make sure that you're following the instructions provided in Migrating to MySQL.

 

Last modified on Feb 19, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.