4

I am attempting to move the database from my local machine running MySQL 5.5.38 to my webhost running 5.1.70. However when I do so I get the following error on at least two tables. I am using a MySQL export/import process.

#1071 - Specified key was too long; max key length is 1000 bytes

Does anyone have any idea how I might overcome this problem, or what is causing it?

3
  • After you swapped the database's charset and collation to UTF-8/utf8_unicode_ci, did you nuke all of the tables and re-import them?
    – Brad Bell
    Feb 2 '15 at 2:54
  • Hi Brad - yes I did - well I nuked them first, made the ALTER and then reimported. But I've just discovered now the MySQL server does not have the required InnoDB database engine, and I very strongly suspect that is the problem (I worked this out when I tried to do a clean install of Craft). Feb 2 '15 at 3:12
  • 2
    Ahh... no doubt that's certainly part of the problem, if not the problem.
    – Brad Bell
    Feb 2 '15 at 4:54
5

I bumped into this last week, and it is exactly as you suspect... your new database does not support InnoDB, which is a requirement of Craft.

I'd suggest discussing the matter with your hosting company. In my case, the hosting company was unable to offer InnoDB support in any form, therefore disqualifying them as a viable hosting option for our new site.

2
  • Yes, thanks Lindsey, that was indeed the problem. For some reason the InnoDB engine which was supposed to be installed on the server I'm using was not, and I had not thought to check. That has been rectified and the SQL upload works now. Feb 2 '15 at 18:55
  • Got your own vps or server? Check out your mysql error log and run down this check list. dev.mysql.com/doc/refman/5.1/en/error-creating-innodb.html
    – Derak
    Feb 4 '15 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.