#1071 - Specified key was too long; max key length is 767 bytes
Permalink
I tried to import database to a server but I immediately encountered a problem with Php admin.
what i should do next?
-- Dumping structure for data_base.areapermissionassignments
CREATE TABLE IF NOT EXISTS `areapermissionassignments` (
`cID` int(10) unsigned NOT NULL DEFAULT '0',
`arHandle` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`pkID` int(10) unsigned NOT NULL DEFAULT '0',
`paID` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`cID`,`arHandle`,`pkID`,`paID`),
KEY `paID` (`paID`),
KEY `pkID` (`pkID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
#1071 - Specified key was too long; max key length is 767 bytes
what i should do next?
-- Dumping structure for data_base.areapermissionassignments
CREATE TABLE IF NOT EXISTS `areapermissionassignments` (
`cID` int(10) unsigned NOT NULL DEFAULT '0',
`arHandle` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`pkID` int(10) unsigned NOT NULL DEFAULT '0',
`paID` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`cID`,`arHandle`,`pkID`,`paID`),
KEY `paID` (`paID`),
KEY `pkID` (`pkID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
#1071 - Specified key was too long; max key length is 767 bytes
Thanks!
Solution to the problem was update mysql 5.6 to 5.7
Solution to the problem was update mysql 5.6 to 5.7
Another solution is here:https://concrete5.slack.com/archives/CDJ4G93C3/p1567775808100800...
You need to convert the db to use utf8 encoding (NOT MB4), as the longest key for this is fine
export the whole db from source
find and replace utf8mb4 with utf8
then import the sql file
You need to convert the db to use utf8 encoding (NOT MB4), as the longest key for this is fine
export the whole db from source
find and replace utf8mb4 with utf8
then import the sql file
I don't know how.