Error on installing: Specified key was too long; max key length is 1000 bytes

A Database Error Occurred
Error Number: 1071

Specified key was too long; max key length is 1000 bytes

ALTER TABLE ip_custom_fields MODIFY COLUMN custom_field_table VARCHAR(500);

Filename: /home/artxcent/public_html/igr/modules/setup/models/mdl_setup.php

Line Number: 94

You are also allowed to search on Google for errors. Found this 10 seconds after searching for it and it also applies for InvoicePlane too because it’s a MySQL-only error.

Hi there,

Thank you for your reply,

I saw the message but I don’t know what to do.

When I try to install InvoicePlane 1.46 it does not happen that error.

It happen with InvoicePlane 1.47.

What shoud I do?

in my browser the address is :

Sorry !

Sorry Kovah, but thats not an MySQL-error only.
As other user said, it just happens at new version.
storage_engine=‘InnoDb’; is default at MySQL

please look if there is an error in the code of new version.

Thanks a lot!

I’m not sure if this answer is really possible to execute, but I would suggest to convert to mariadb.

I haven’t had any problems using mariadb.

1 Like

most important question are you using 1.4.7 ?
no error at 1.4.6 !!!

Could you please post the exact MySQL Version you are using?
I have tested the installation with bith MariaDB and MySQL 5.5 and 5.6 and didn’t get such an error.

laurens: mariadb is better sorry, Oracle should not be supportet as all BIG FAT FINANCE CORPS
its seems to be newer version of mysql shipped with ubuntu 16.04 not working!

thanks a lot for the tip Kovah :smile:

I can confirm the issue. The error happens on MySQL 5.7 only (installed with Ubuntu 16.04).

This is because MySQL 5.7 has more strict check about the type.

VARCHAR(500); is not allowed, it should be TEXT or MEDIUMTEXT.

BTW, on 5.6, VARCHAR(500); is converted to a text field.

1 Like

This is pretty weird as the 5.7 manual states that varchar is allowed to have a length of 65,535.

Database tables was on MyISAM storage engine.

Migrating them to InnoDB “solved” the issue:

I think you should specify the storage engine on SQL migrations files for first installation.

BTW, using MEDIUMTEXT directly would do the same thing with more inter-compatibility.