How to Fix MySQL Error – #1089 – Incorrect prefix key or the storage engine doesn’t support unique prefix keys

Today in this article we will discuss one of the most common errors of MySQL that you may face while creating tables or importing the DataBase to the new server and that is #1089 – 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. 

This occurs due to the syntax error in Create query of Database Table.


If you run the below query, you may face the above error and the query will stop working and will not create a Database Table.

And, If you run the below query, you will not face any error and query will work and create a new table.

In the first query, we were supplying the Key length to Primary Key, by ridding that your query will work and create a Database Table.

Leave a Reply