Not Able to Import a mysqldump File From MySQL 5.0 Into MySQL 5.1 (or greater) ; Fails With ERROR 1089: Incorrect prefix key;

(Doc ID 2063814.1)

Last updated on DECEMBER 27, 2016

Applies to:

MySQL Server - Version 5.0 and later
Information in this document applies to any platform.


When attempting to import a dump file made using mysqldump in a 5.0 mysqld, into a 5.1 or newer mysqld instance, the import will fail with:

ERROR 1089 (HY000) at line 31: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys


The problem happens when loading a 5.0 mysqldump onto a 5.1+ mysqld instance due to incompatible changes when using prefixed/partial indexes on the newer GEOMETRY data type. Loading the 5.0 mysqldump into a 5.0 mysqld instance will not exhibit the problem.


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms