This error
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
The SQL being executed was: ALTER TABLE `contentcontainer_permission` ADD CONSTRAINT `contentcontainer_permission_pk` PRIMARY KEY (`permission_id`, `group_id`, `module_id`, `contentcontainer_id`)
Error Info: Array
(
[0] => 42000
[1] => 1071
[2] => Specified key was too long; max key length is 1000 bytes
I have seen before.
This is not a WAMPServer error !!!
This is a limitation of MySQL. We dont write MySQLThe problem is that the compound key contains more than 1000 characters when using the Unicode charset (up to 4 bytes per character).
One possible solution (but not necessarily a good one) is to change the collation to `utf8`.
Another would be to reduce the size of one or more of the key parts, I normally see a VARCHAR(255) in these situations, and normally this is because the ORM (Doctrine for example) defaults a string to VARCHAR(255) unless otherwise instructed to use a different more appropriate size.
Other can be found on GOOGLE using the search string `yii SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes`
But all of these solutions need to be understood BY YOU so that they fit with your application needs and requirements. If you are getting something off the shelf, contact the developer for advice---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>Read The Manuals Apache --
MySQL --
PHP --
phpMyAdminGet your Apache/MySQL/mariaDB/PHP ADDONs here from the
WAMPServer alternate Repo-X-X-X-
Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-