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

Permalink
Hi!

I'm currently moving my concrete5.7 setup from localhost to a live server. First thing I did was export the SQL database and import it on the server, however this is giving me an error:

Error
SQL query:
-- --------------------------------------------------------
--
-- Tabelstructuur voor tabel `config`
--
CREATE TABLE IF NOT EXISTS  `config` (
 `configNamespace` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL DEFAULT  '',
 `configGroup` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL ,
 `configItem` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL ,
 `configValue` LONGTEXT COLLATE utf8_unicode_ci,
PRIMARY KEY (  `configNamespace` ,  `configGroup` ,  `configItem` ) ,
KEY  `configGroup` (  `configGroup` )
) ENGINE = INNODB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci;
MySQL said:


Should I shorten the key? Will this affect my website?

Thank you for any feedback

 
Temposaur replied on at Permalink Reply
Temposaur
Yep, having the very same problem.
Temposaur replied on at Permalink Reply
Temposaur
I have MySQL 5.0.77... so mine's too old version for 5.7.


***
C5 5.7 requirements
MySQL 5.1.5 or higher.
MySQL Innodb table support.
***
WebcentricLtd replied on at Permalink Reply
what version of mysql are you using?
hawkagent replied on at Permalink Reply
I'm testing it on a free host, hostinger.

APACHEVERSION: Apache/2.4.10
PHP VERSION 5.3
MYSQL VERSION 5.1.6

So the MySQL requirement is met.
WebcentricLtd replied on at Permalink Reply
I'd see if your host can help. They might be able to change innodb settings to accommodate the index length, or index only the first nn characters (???).

I don't know what effect shortening the field would make - setting those fields at varchars of 255 might just have been lazy or there might be a reason.

Also, not sure how you'd handle this in the install process - you'd need to have a good look as to exactly what you'd need to change.
alanski replied on at Permalink Reply
alanski
Was curious about this so slung the query at MySQL version 5.5 and it ran fine.

You could try running the query manually without the rest of the sql or set it up by hand first and then run the whole query minus the offending part......