Update from 17.0.1 to 17.0.2 fails - General error: 1478 InnoDB: Tablespace innodb_system cannot contain a COMPRESSED table
Hi there
Since I haven't gotten any feedback from Nextcloud community and I am in this update predicament, I post this request as well here. Thank you for your help.
I have recently migrated my ownCloud installation to NextCloud 17.0.1. All seemed to work fine and there were no warning in the settings. Then NC 17.02 was released and I clicked on the web updater button. I run Apache2 on Ubuntu 19 and MySQL server. The first part of the installation went well with no errors. However, the DB update part threw an error and blocks the further operation of my instance: _``` Preparing update Set log level to debug Turned on maintenance mode Repair step: Repair MySQL collation Repair info: Change row format for oc_addressbookchanges … Repair info: Change collation for oc_addressbookchanges … Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘ALTER TABLE oc_addressbookchanges ROW_FORMAT=COMPRESSED;’: SQLSTATE[HY000]: General error: 1478 InnoDB: Tablespace innodb_system cannot contain a COMPRESSED table
Any idea how to solve this? Thank you.
Best,
Markus
Thank you for reporting this issue :+1: Please check https://github.com/nextcloud/server/issues/15058 for more details.
Usually there are two ways to fix this:
A) Configure your database server to support utf8mb4 (https://docs.nextcloud.com/server/16/admin_manual/configuration_database/mysql_4byte_support.html).
B) If the database server does not support utf8mb4 disable it by setting 'mysql.utf8mb4' => false in your config.php (emojis in filename, calendar events, etc. are not possible than and you have to accept the warning).
Your error seems to be a bit different but InnoDB: Tablespace innodb_system looks like innodb_file_per_table=0.
Thank you. I have tried to follow your link (https://docs.nextcloud.com/server/16/admin_manual/configuration_database/mysql_4byte_support.html). Even though I wasnt able to enable Baracuda file format ("show variables like 'innodb_file_format'; " delivered Empty set (0.00 sec), I was able to run the other commands. I ended up in more or less the same situation:
"sudo -u www-data php occ maintenance:repair
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
- Repair MySQL collation
- Change row format for oc_addressbookchanges ...
- Change collation for oc_addressbookchanges ...
In AbstractMySQLDriver.php line 106:
An exception occurred while executing 'ALTER TABLE `oc_addressbookchanges` ROW_FORMAT=COMPRESSED;':
SQLSTATE[HY000]: General error: 1478 InnoDB: Tablespace `innodb_system` cannot contain a COMPRESSED table
In PDOStatement.php line 119:
SQLSTATE[HY000]: General error: 1478 InnoDB: Tablespace `innodb_system` cannot contain a COMPRESSED table
In PDOStatement.php line 117:
SQLSTATE[HY000]: General error: 1478 InnoDB: Tablespace `innodb_system` cannot contain a COMPRESSED table
maintenance:repair [--include-expensive]"
- Which mysql version is in use?
- You have configured the mysql server properly? (as explained in the docs)
1.) MySQL Server version: 8.0.18-0ubuntu0.19.10.1 (Ubuntu) 2.) Sure, it was working with OC and NC with version 17.0.1 very well
I applied the option 'mysql.utf8mb4' => false as mentioned by you. This did the trick for the moment. However, I would like to have the fully funtional nextcloud in place if possible....
Please check: show variables like 'innodb_file_per_table'; and show variables like 'innodb_file_format'; I remember another post (here or at help.nextcloud.com) where a user reported that some tables are still MyISAM. Unfortunately i'm not able to find it.
Well, this looks correct:
mysql> show variables like 'innodb_file_per_table'; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | innodb_file_per_table | ON | +-----------------------+-------+ 1 row in set (0.00 sec)
Howver, show variables like 'innodb_file_format'; Empty set (0.00 sec)
Was it this post here? https://help.nextcloud.com/t/problem-upgrading-from-12-0-3-to-12-0-4-utf8mb4/24367. I have checked all tables for their ENGINE (show table status;) but all tables where showing InnoDB.
I have exactly the same bug on Nextcloud 19.0.2. My Nextcloud installation was migrated a while ago from owncloud.
I tried to activate MySQL 4 byte support following Nextcloud documentation.
All seems ok on database character set :
ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE
But when I tried to convert all existing tables :
sudo -u www-data php occ maintenance:repair
I have the following errors :
- Repair MySQL collation
- Change row format for oc_addressbooks ...
- Change collation for oc_addressbooks ...
In AbstractMySQLDriver.php line 106:
An exception occurred while executing ALTER TABLE oc_addressbooks R
OW_FORMAT=COMPRESSED;
SQLSTATE[HY000]: General error: 1478 InnoDB: Tablespace innodb_system
cannot contain a COMPRESSED table
In PDOStatement.php line 119:
SQLSTATE[HY000]: General error: 1478 InnoDB: Tablespace innodb_system
cannot contain a COMPRESSED table
In PDOStatement.php line 117:
SQLSTATE[HY000]: General error: 1478 InnoDB: Tablespace innodb_system
cannot contain a COMPRESSED table
maintenance:repair [--include-expensive]
Is this situation need a fix on Nextcloud side or is it possible to do something ?
Thank you for taking the time to report a bug! 👍
As this seems to be a setup issue I would like to ask you to raise your question in the forums: https://help.nextcloud.com If you wish support with setup issues from Nextcloud GmbH we offer this as part of the Nextcloud subscription. Learn more about this at https://nextcloud.com/enterprise/
@Choukajohn did you fix it?
@lgg since this I have migrated from MySQL to MariaDb, during migration I created new databases and then restore a mysqldump (db saves) and I don't have the warning anymore in nextcloud for the 4 bytes support.