Hello Girls and Guys,
I was using Nextcloud Beta 13 with MySQL on my Raspberry Wheezy until i found a Crypto-Miner on my Raspberry.
So i made a Backup with dd and installed everything new.
Now i have a brand new Raspbian system with Nextcloud 12.0.4 (Stable instead of Beta now) and am trying to restore my old Nextcloud Database.
I already extracted the “nextcloud” folder from /var/lib/mysql/nextcloud in my Backup-Image.
After that i copied it to my new Raspbian instance and changed the owner to mysql.
The directory is full of files like ‘oc_***.frm’.
After that i created a new MySql-User with my old Username and also the old password that is saved in the config.php.
But it is still not working and i can’t really find out why.
My config.php:
<?php $CONFIG = array ( 'instanceid' => '***', 'passwordsalt' => '****', 'secret' => '*****', 'trusted_domains' => array ( 0 => 'mydomain.com', ), 'datadirectory' => '/media/festplatte/Nextcloud/data', 'overwrite.cli.url' => '/', 'dbtype' => 'mysql', 'version' => '12.0.4', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'dbuser' => 'oc_**USERNAME**', 'dbpassword' => '*****', 'installed' => true, 'forcessl' => true, 'forceSSLforSubdomains' => true, 'theme' => '', 'maintenance' => false, 'appstore.experimental.enabled' => true, 'loglevel' => 0, 'trashbin_retention_obligation' => 'auto', 'updatechecker' => false, 'updater.server.url' => 'https://updates.nextcloud.org/updater_server/', 'updater.release.channel' => 'stable', 'htaccess.RewriteBase' => '/', 'memcache.local' => '\\OC\\Memcache\\APCu', 'updater.secret' => '******', );
And my Nginx Error Log Looks like this. But i can’t find out why he can’t access the Database:
{"reqId":"j3yESksMUfCPHN3MaLxR", "level":4, "time":"2018-01-09T22:40:23+00:00", "remoteAddr":"79.225.234.214", "user":"--", "app":"remote", "method":"GET", "url":"\/status.php", "message":"An exception occurred while executing 'SELECT * FROM `oc_appconfig`':\n\nSQLSTATE[42S02]: Base table or view not found: 1932 Table 'nextcloud.oc_appconfig' doesn't exist in engine", "userAgent":"Mozilla\/5.0 (Linux) mirall\/2.3.3 (Nextcloud)", "version":"12.0.4"}
I can’t find a solution for this exception.
If this was the wrong way to do it i can completly delete Nextcloud,Php and MySql again and start again.
I would really appreciate your ideas and your help.
Thanks in regard