1&1 MySQL Specified key was too long
Hi zusammen,
beim Versuch des Imports einer Datenbank von All-Inkl zu 1&1 (jaja, ich weiss, ist aber der Server des Kunden), erhalte ich folgenden Fehler:
Code:
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `tl_newsletter_recipients`
--
CREATE TABLE IF NOT EXISTS `tl_newsletter_recipients` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`pid` int(10) unsigned NOT NULL DEFAULT '0',
`tstamp` int(10) unsigned NOT NULL DEFAULT '0',
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`active` char(1) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`addedOn` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`confirmed` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`ip` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`token` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE KEY `pid_email` (`pid`,`email`),
KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;
MySQL meldet: Dokumentation
#1071 - Specified key was too long; max key length is 767 bytes
Liegt das an der MySQL-Version? Bei All-Inkl ists 5.7 und bei 1&1 5.5.
all-inkl.de Key was too long
Hallo Leute,
auch bei mir tritt das Problem "Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes" auf. Es handelt sich bei mir um eine komplette Neuinstallation. Wenn ich bei der Installation die betroffene Tabelle "tl_newsletter_recipients" weg lasse, taucht das Problem bei der nächsten Tabelle auf (tl_search).
Hoster: all-inkl.de
Version: Contao 4.6
Vielen Dank für Eure Unterstützung
Florian
Code:
[2019-01-20 12:03:05] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing 'CREATE TABLE tl_newsletter_recipients (id INT UNSIGNED AUTO_INCREMENT NOT NULL, pid INT UNSIGNED DEFAULT 0 NOT NULL, tstamp INT UNSIGNED DEFAULT 0 NOT NULL, email VARCHAR(255) DEFAULT '' NOT NULL, active CHAR(1) DEFAULT '' NOT NULL, addedOn VARCHAR(10) DEFAULT '' NOT NULL, confirmed VARCHAR(10) DEFAULT '' NOT NULL, ip VARCHAR(64) DEFAULT '' NOT NULL, token VARCHAR(32) DEFAULT '' NOT NULL, UNIQUE INDEX pid_email (pid, email), INDEX email (email(191)), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB ROW_FORMAT = DYNAMIC': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes" at /www/htdocs/w0190762/contaotest.websysinfo.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 126 {"exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 0): An exception occurred while executing 'CREATE TABLE tl_newsletter_recipients (id INT UNSIGNED AUTO_INCREMENT NOT NULL, pid INT UNSIGNED DEFAULT 0 NOT NULL, tstamp INT UNSIGNED DEFAULT 0 NOT NULL, email VARCHAR(255) DEFAULT '' NOT NULL, active CHAR(1) DEFAULT '' NOT NULL, addedOn VARCHAR(10) DEFAULT '' NOT NULL, confirmed VARCHAR(10) DEFAULT '' NOT NULL, ip VARCHAR(64) DEFAULT '' NOT NULL, token VARCHAR(32) DEFAULT '' NOT NULL, UNIQUE INDEX pid_email (pid, email), INDEX email (email(191)), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB ROW_FORMAT = DYNAMIC':\n\nSQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes at /www/htdocs/w0190762/contaotest.websysinfo.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:126, Doctrine\\DBAL\\Driver\\PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes at /www/htdocs/w0190762/contaotest.websysinfo.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:109, PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes at /www/htdocs/w0190762/contaotest.websysinfo.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:107)"} []
Liste der Anhänge anzeigen (Anzahl: 1)
Zitat:
Zitat von
xchs
Den Cache kannst Du auch im Contao Manager (Systemwartung > Anwendungscache > Prod.-Cache erneuern) löschen und neu aufbauen lassen.
Hallo xchs,
danke für den Hinweis, hat aber leider nichts geholfen. Hier noch mal meine einzelnen Schritte:
- Die die Datei wird unter folgendem Pfad angelegt "app/config/config.yml" mit dem Inhalt: Anhang 21834 (das .txt entfernen, habe ich nur zum Upload hier im Forum benötigt)
- Ich führe im im Contao-Manager unter Maintanance, bei Application Cache "Rebuild Production Cache" aus.
- Install-Tool starten /contao/install mit Password
- Jetzt kommt der Hinweis: Es ist ein Fehler aufgetreten, wenn ich var/logs aufrufe (app/logs ist nicht vorhanden) kommt folgender Hinweis :(:
Code:
[2019-01-20 21:19:25] request.INFO: Matched route "contao_install". {"route":"contao_install","route_parameters":{"_route":"contao_install","_scope":"backend","_token_check":true,"_controller":"Contao\\InstallationBundle\\Controller\\InstallationController::installAction"},"request_uri":"http://contaotest.websysinfo.de/contao/install","method":"HEAD"} []
[2019-01-20 21:19:25] request.INFO: Matched route "contao_install". {"route":"contao_install","route_parameters":{"_route":"contao_install","_scope":"backend","_token_check":true,"_controller":"Contao\\InstallationBundle\\Controller\\InstallationController::installAction"},"request_uri":"http://contaotest.websysinfo.de/contao/install","method":"GET"} []
[2019-01-20 21:19:26] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\TableNotFoundException: "An exception occurred while executing 'SELECT * FROM tl_user WHERE `username`='florian' LIMIT 0,1': SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd02d20d1.tl_user' doesn't exist" at /www/htdocs/w0190762/contaotest.websysinfo.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 62 {"exception":"[object] (Doctrine\\DBAL\\Exception\\TableNotFoundException(code: 0): An exception occurred while executing 'SELECT * FROM tl_user WHERE `username`='florian' LIMIT 0,1':\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'd02d20d1.tl_user' doesn't exist at /www/htdocs/w0190762/contaotest.websysinfo.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:62, Doctrine\\DBAL\\Driver\\PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd02d20d1.tl_user' doesn't exist at /www/htdocs/w0190762/contaotest.websysinfo.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:109, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd02d20d1.tl_user' doesn't exist at /www/htdocs/w0190762/contaotest.websysinfo.de/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:107)"} []
Vielen Dank und schöne Grüße
Florian