To clear the table, enter the MySQL console:
mysql -uroot p
Log on with your password and enter:
truncate owncloud.oc_filecache; check table owncloud.oc_filecache; quit
(owncloud
is the database name and oc_
is the table name prefix, both of which are specified during setup and can differ on your system.)
This will delete the entire contents of the table—which is OK for oc_filecache
, as it will get rebuilt by the server, but do not do this on a random table unless you know what you are doing.
After that, I retried running occ upgrade
and got another error, this time for the oc_activity
table.
After a quick search revealed that oc_activity
holds recent activity data (from which entries eventually expire), I re-ran the above operation on oc_activity
(sacrificing the “Recent Activity” entries of all users in the system) and retried occ upgrade
.
This time, the upgrade went through smoothly without any errors. I had to run occ maintenance:mode --off
manually, then re-enable my apps, and things look OK now.