Hi. I recently upgrade from NC 15.x -> NC 16.x
I got the warning message about that my MySQL server wasn’t in the best shape and that I should fix it. I followed the link from the warning: https://docs.nextcloud.com/server/16/admin_manual/configuration_database/mysql_4byte_support.html
Did exactly as describe, but I’m facing some problems ATM!
sudo -u www-data php occ maintenance:repair
Do I get the following error message.
root@nextcloud:/var/www/nextcloud# sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value="true"
System config value mysql.utf8mb4 set to boolean true
root@nextcloud:/var/www/nextcloud# sudo -u www-data php occ maintenance:repair
- Repair MySQL collation
- Change row format for oc_accounts ...
- Change collation for oc_accounts ...
- Change row format for oc_activity ...
- Change collation for oc_activity ...
- Change row format for oc_activity_mq ...
- Change collation for oc_activity_mq ...
- Change row format for oc_addressbookchanges ...
- Change collation for oc_addressbookchanges ...
- Change row format for oc_addressbooks ...
- Change collation for oc_addressbooks ...
In AbstractMySQLDriver.php line 125:
An exception occurred while executing 'ALTER TABLE `oc_addressbooks` CONVERT TO CHARACTER SET
utf8mb4 COLLATE utf8mb4_bin;':
root@nextcloud:/var/www/nextcloud# sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value="true"
Nextcloud is in maintenance mode - no apps have been loaded
System config value mysql.utf8mb4 set to boolean true
root@nextcloud:/var/www/nextcloud# sudo -u www-data php occ maintenance:repair
Nextcloud is in maintenance mode - no apps have been loaded
- Repair MySQL collation
- Change row format for oc_addressbooks ...
- Change collation for oc_addressbooks ...
In AbstractMySQLDriver.php line 125:
An exception occurred while executing 'ALTER TABLE `oc_addressbooks` CONVERT TO CHARACTER SET
utf8mb4 COLLATE utf8mb4_bin;':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key l
ength is 767 bytes
In PDOStatement.php line 143:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key l
ength is 767 bytes
In PDOStatement.php line 141:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key l
ength is 767 bytes