MySQL Database Migration fails with Specified key was too long max key length is 1000 bytes
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)
There is a known bug with MySQL related to MyISAM, the UTF8 character set and indexes that you can check here.
- Make sure MySQL is configured with the InnoDB storage engine.
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';
- And finally make sure that you're following the instructions provided in Migrating to MySQL.