Move Database in NextCloudPI to external SQL/MariaDB

Hello,
i have a fresh installed NextCloudPi and want to move the database so a external mariadb Server, how can i manage this in the config menue tehre is only the option to moe it to another USB drive.
I have tried it with the php occ db:convert-type --all-apps mysql … but i cant acces the nextcloud folder over ssh “acces denied” any ideas?

Tnaks for Help

Now i have rights to the folders but i can not move the DB with the
occ db:convert-type --all-apps mysql …
becouse it says it is already a mysql db. Is tehre a way to move the DB?

You can not move the database to an external server using NCP.

You will have to edit config.php manually. (I have never tried using external dbserver.)

From documentation:

An Nextcloud instance configured with MySQL would contain the hostname on which the database is running, a valid username and password to access it, and the name of the database. The config/config.php as created by the Installation wizard would therefore contain entries like this:

<?php

“dbtype” => “mysql”,
“dbname” => “nextcloud”,
“dbuser” => “username”,
“dbpassword” => “password”,
“dbhost” => “localhost”,
“dbtableprefix” => “oc_”,

OK Thank you,
then i will try to backup the DB from the Installation on the PI -> Import it to my External dbserver and edit the config.php.
I will write back when i have done this :slight_smile:

No i think my installation is broken. I have made a import to my db server and change the config, after re login i get a white scrren on the nextcloud. After that i rechanged my config and now the server hade a internal error. even after restore the last backup form net nc concole i get this. I think i will make a new installation and try again…