Upgrade to 10.13.0 fails: SQLSTATE[HY000]: General error: 1812 Tablespace is missing for tablemeineCloud.oc_migrations

First of all, I’ve installed OwnCloud this way:

echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/server:/10/Ubuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/isv:ownCloud:server:10.list
curl -fsSL https://download.opensuse.org/repositories/isv:ownCloud:server:10/Ubuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/isv_ownCloud_server_10.gpg > /dev/null
sudo apt update
sudo apt install owncloud-complete-files

So by running apt updates it will get updated too.

This time it installed the Version 10.13.0

After that, opening the web page, a database update is waiting. It shows me the following:

ownCloud wird auf Version 10.13.0 aktualisiert.

Diese Apps werden aktualisiert:

* Activity (activity)
* Admin Config Report (configreport)
* Files (files)
* Text Editor (files_texteditor)
* First run wizard (firstrunwizard)
* Market (market)
* Notifications (notifications)

Now what happens.

Steps to reproduce

  1. Open the page
  2. Click on the button to start the update.

Expected behaviour

Running and finish the update.

Actual behaviour

I get the following error message:

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT versionFROMoc_migrationsWHEREapp= ? ORDER BYversionASC' with params ["core"]: SQLSTATE[HY000]: General error: 1812 Tablespace is missing for tablemeineCloud.oc_migrations.

Clicking on that part in PhpMyAdmin outputs the same error message.

Trying to do a repair end with:


* Warning InnoDB: Tablespace is missing for table meineCloud/oc_migrations.
* Error Tablespace is missing for table `meineCloud`.`oc_migrations`.
* Error Corrupt

Looking through all entries, only “oc_migrations” is in this faulty state. Every other entry is ok.

I’ve tried with “innodb_force_recovery” parameters to get at least an export of the content and be able to reimport it into a new entry. But no success. The error message just changes to “SQLSTATE[HY000]: General error: 2006 MySQL server has gone away”

Thy mysqldump output with innodb_force_recovery set to 4 looks like this:

Server:~$ mysqldump -u '’ -p meineCloud oc_migrations
Enter password:
– MySQL dump 10.13 Distrib 8.0.34, for Linux (x86_64)

– Host: localhost Database: meineCloud

– Server version 8.0.34-0ubuntu0.22.04.1

!50503 SET NAMES utf8mb4 /;
!40103 SET (at)OLD_TIME_ZONE=(at)(at)TIME_ZONE /;
!40103 SET TIME_ZONE=‘+00:00’ /;
!40111 SET (at)OLD_SQL_NOTES=(at)(at)SQL_NOTES, SQL_NOTES=0 */;

– Table structure for table oc_migrations

DROP TABLE IF EXISTS oc_migrations;
/*!40101 SET (at)saved_cs_client = (at)(at)character_set_client /;
!50503 SET character_set_client = utf8mb4 /;
CREATE TABLE oc_migrations (
app varchar(177) COLLATE utf8mb4_bin NOT NULL,
version varchar(14) COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (app,version)
!40101 SET character_set_client = (at)saved_cs_client */;

– Dumping data for table oc_migrations

mysqldump: Couldn’t execute ‘SELECT /*!40001 SQL_NO_CACHE */ * FROM oc_migrations’: Lost connection to MySQL server during query (2013)

I don’t want to start with a clean new OwnCloud installation.

So is there a way to fix this?

EDIT: I was able to do a rollback of the entire server with a backup to a date before the update got installed. The version is now and the server is running.

The “oc_migrations” entry in the database is still corrupt.

But: Maybe with a running server its possible to delete and rebuild this?

Server configuration

Operating system: Ubuntu 22.04.3 LTS

Web server: Apache

Database: libmysql - mysqlnd 7.4.33

PHP version: 7.4.33

ownCloud version: 10.13.0

Updated from an older ownCloud or fresh install: Updated from the earlier version that got rolled out over the repo. (

Where did you install ownCloud from: As described at the beginning

The other stuff in the list is currently not possible (because I get nothing more than this Database update page) or there is no visible connection to the faulty database entry.


i found the following on https://dba.stackexchange.com/a/244480:

"Tablespace is missing for table XXXX”

There are broadly three ways in which this error can happen:

  • Table files have the wrong ownership/permissions
  • The table file is misplaced
  • The data file is corrupted or deleted

other solutions can be found here: https://bobcares.com/blog/mysql-tablespace-is-missing-for-table/

I think there could be a serious issue on database system level not related to ownCloud.

If this is the case i think the database manual, support community or some professional help could be required to recover from these database issues.