ERROR 1071 (42000) at line 10374: Specified key was too long; max key length is 1000 bytes

Hi,

I have been trying to restore one of the websites on a Virtualmin server several times and constantly am hitting the erro in the subject. Searching online gives no result on Virtualmin.com, but some other websites like:

http://stackoverflow.com/questions/10873870/mysql-error-1071-specified-key-was-too-long-max-key-length-is-1000-bytes-in-s
http://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes

but they are not applicable in my situation since I usually go to the respective backup log screen, select the successful backup and hit restore. I don’t know how to append any additional parameters to restore process.

How should we do in this kind of situations?

Howdy,

Well, the solution mentioned at your first link may work for you… the key may be to make sure that InnoDB isn’t disabled.

Check out the solution the question poster adds to his post in the section “UPDATE: SOLUTION”, and see if that does the trick for you.

-Eric

Thanks Eric,

That solution didn’t work for me, but I found a solution by removing all the settings for InnoDB from my.cnf and restarting MySQL. This time restore has worked out just fine, so I believe InnoDB was just good with default settings.