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:
#1071 - Specified key was too long; max key length is 1000 bytes
I'm aware that the key is too long but is there any freedom to change? I've tried changing the database collation to latin1 but it did not work.
What settings can I change?
Thank you for any feedback
That is a poor choice of primary key - you do not need 1000 bytes of entropy to make a row unique If there is no natural choice of primary key, you can generate a surrogate key for the row.
e.g. replace
with
This should not be a breaking change for an application which uses the above.