The upgrade to Matomo 4.7.0 went to the following error while the database converting is running:
Kritischer Fehler während der Aktualisierung: /srv/www/vhosts/sovd.de/statistik.sovd.de/core/Updates/4.7.0-b2.php: Error trying to execute the migration ‘ALTER TABLE matomo_changes ADD UNIQUE KEY unique_plugin_version_title (plugin_name, version, title);’. The error was: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
I had the same issue this morning and just solved it with a simple command !
Try to update the limit with this command :
SET @@global.innodb_large_prefix = 1;
(You need to have accès to your database)
And if you want to push the migration yourself :
USE matomo; //(replace matomo by your database name)
SET @@global.innodb_large_prefix = 1;
ALTER TABLE `matomo_changes` ADD UNIQUE KEY unique_plugin_version_title (`plugin_name`, `version`, `title`);
I asked my host to upgrade to 5.7 but they advised against it as it can break other stuff on my server. Unbelievable that the Matomo updater don’t check this things upfront. I can’t do anything in Matomo right now as it’s stuk on the update progress
Maybe you could try to download your database, fix it on a local environement and then reupload ?
(By fixing it, I would say to try again to fix the limit issue)
I don’t think MariaDB 5.7 will fix your problem, I had the exact same issue with MariaDB 5.7 and fixed it with the command lines above.
For security reasons, you need to update your database version, but it’s not the cause of your problem right now.