Support

Site Restoration

#30930 Specified key was too long - error

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
CMS Type
Other
CMS Version
n/a
Backup Tool Version
n/a
Kickstart version
n/a

Latest post by on Sunday, 17 March 2019 18:17 CDT

webdevtim
I hate to have to post another ticket, but I thought maybe you guys have a quick answer you could provide.

Database restoration

An error occurred while restoring the database. The error message can be found below. Click on the × button at the top right of this dialog message to close it and return to the database restoration page.

Database error processing line 240



Database server error reply:

ErrNo #1071



Specified key was too long; max key length is 767 bytes

SQL=CREATE TABLE `xxxxx_akeeba_common` ( `key` varchar(192) COLLATE utf8mb4_unicode_ci NOT NULL, `value` longtext COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci



Raw query text:



CREATE TABLE `#__akeeba_common` ( `key` varchar(192) COLLATE utf8mb4_unicode_ci NOT NULL, `value` longtext COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci


Siteground simply updated the PHP version, but that doesn't seem to work. character set is utf8mb4 and collation is utf8mb4_unicode_ci, but all hte tables are a mixed bag of utf8_unicode_ci, utf8mb4_unicode_ci and utf8mb4_unicode_ci. Running the database check and upgrade tools in MAMP indicates everything is OK. When transferring to host I get what seems like an erorr from long ago after reading the other tickets on akeebabackup,com for error #1071

tampe125
Akeeba Staff
Hello,

the problem is that such table has a primary key that is too long for the given charset. #__akeeba_common is used to store library dependencies between our software.
However despair not, there's an easy fix. If you have a recent version of Akeeba Backup, inside ANGIE, during the database restoration, you'll see two more options: Stop on CREATE error, Stop on other errors.
Remove the flag from those two options and run the restoration again. At the end of the restoration you'll see a log of all the queries that failed, if these entries are only about the akeeba_common table, you're good to go.

When you completed the restoration, simply install again Akeeba Backup (and any other Akeeba software), without the need to uninstall it first. Akeeba will create the common table again and store all the dependencies once again.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

webdevtim
OK, I saw no log of failed queries. where do I look for this?

webdevtim
I wanted to add that that the installation completed without error after unchecking Stop on CREATE error and Stop on other errors. I just didn't see a list of failed queries. I will reinstall Akeeba Backup, as you suggested.

One other thing, I am developing this on local host and uploading it to siteground.com so that the client can see the progress on the site. When this gets approved, I will insist that they purchase a subscription to Akeebabackup Pro and Akeeba Admin Tools Pro as well. Every site I develop, I will insist that they have the3 Akeeba products installed.

You guys do very good work.

tampe125
Akeeba Staff
That's great news!
And thank you very much for your efforts, our best commercial are satisfied customers :)

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!