0

Attempting to install Drupal 7.16 (also attempted 7.12) onto my local machine, I get the following error at the database stage.

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

Looking at the Drupal database with PHPMyAdmin, I see the "variables" table is created, together two columns; that is all that gets created prior to the error.

I can't find a single solution to this.

0

1 Answer 1

0

This is probably due to the index limitations. From the MySQL docs: CREATE INDEX Syntax

Prefix support and lengths of prefixes (where supported) are storage engine dependent. For example, a prefix can be up to 1000 bytes long for MyISAM tables, and 767 bytes for InnoDB tables.

You probably have a VARCHAR column with length more than 767 or a TEXT column.

1
  • Yes I did. But I've finally solved it - I found the script used to create the tables, and chaged the engine to MyISAM - thanks to your suggestion. Really appreciate your help!
    – Alex
    Nov 5, 2012 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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