Every morning there are a dozen errors in the Nextcloud logs in this form.
TableNotFoundException An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘nextcloud.oc_users’ doesn’t exist
There are no other errors, it’s not having a problem connecting to the database it just can’t find the table.
But when I log into mySql with the credentials from config.php I can
use nextcloud;
show table;
and they are all there including oc_users.
Surprisingly the web pages work fine and I can log in, but every morning when the errors come up it also deletes any files I had added since yesterday, which is a bit sub optimal.
I had recently changed the host from Debian 11 to 12 and updated the Nextcloud version as well. I seem to have ironed out any other problems but I can’t quite seem to track this one, any pointers would be appreciated.
Let me know if there’s other data that would be helpful.
John
Config.php (naughty bits excepted)
<?php $CONFIG = array ( 'passwordsalt' => 'XXX', 'secret' => 'XXX', 'trusted\_domains' => array ( 0 => 'localhost', ), 'datadirectory' => '/var/www/nextcloud/data', 'dbtype' => 'mysql', 'version' => '30.0.11.1', 'overwrite.cli.url' => 'https://NextCloud/', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc\_', 'mysql.utf8mb4' => true, 'dbuser' => 'ncadmin', 'dbpassword' => 'XXX', 'installed' => true, 'instanceid' => 'XXX', 'memcache.local' => '\\\\OC\\\\Memcache\\\\Redis', 'memcache.locking' => '\\\\OC\\\\Memcache\\\\Redis', 'redis' => array ( 'host' => '/var/run/redis/redis.sock', 'port' => 0, 'timeout' => 0.0, 'password' => 'XXX', ), 'tempdirectory' => '/var/www/nextcloud/data/tmp', 'mail\_smtpmode' => 'sendmail', 'mail\_smtpauthtype' => 'LOGIN', 'mail\_from\_address' => 'admin', 'mail\_domain' => 'ownyourbits.com', 'preview\_max\_x' => '2048', 'preview\_max\_y' => '2048', 'jpeg\_quality' => '60', 'overwriteprotocol' => 'https', 'loglevel' => '2', 'log\_type' => 'file', 'htaccess.RewriteBase' => '/', 'maintenance' => false, 'theme' => '', 'trusted\_proxies' => array ( 11 => '127.0.0.1', 12 => '::1', ), 'maintenance\_window\_start' => 2, 'default\_phone\_region' => '860', 'data-fingerprint' => 'XXX', );