Okay but what about password to the user Oc_rene? It is apparently a user nextcloud has created in the database during installation ?? But I can see I need password for the user “Oc_rene” to backup the database?
“After you enter your root or administrator login for your database, the installer creates a special database user with privileges limited to the Nextcloud database. Then Nextcloud needs only the special Nextcloud database user, and drops the root dB login”
I have tried to look at the different guides to how to restore from backup on the new server but can not find any explanation how to restore the user “Oc_rene” which is a user nextcloud made during the setup on the old installation?
Does your “new” server already has a database named “nextcloud” for you to drop?
if yes, use a user (could be root in mysql) to drop it. Or grant Oc_rene the privilege to drop database. (just wonder why the original admin didn’t do it, what to protect from?)
if no, skip this step.
BTW, on the “new” server, you need to create “new” user and grant it proper privileges. Lot of people will change those default name for the sake of security, But still lot of home router can be logged in by admin/admin. Just make sure you use the same set of id/pwd here and in config/config.php.
"You will need the root database login, or any administrator login that has permissions to create and modify databases, and then enter any name you want for your Nextcloud database.
After you enter your root or administrator login for your database, the installer creates a special database user with privileges limited to the Nextcloud database. Then Nextcloud needs only the special Nextcloud database user, and drops the root dB login. This user is named for your Nextcloud admin user, with an oc_ prefix, and then given a random password. The Nextcloud database user and password are written into config.php:"
But since it is NOT a full installation I do on the new server but a restore from a backup database, does nextcloud NOT make the user Oc_rene automatically? And there must be a security cause that you do not use the root user for the nextcloud database on the new installation?. Therefore, it would be beneficial to explain in your guide to how to restore the database to a new installation, how to restore previous users from the old installation as they are not existing on a clean installation. Does it make sense ?
You can create the according database user and the database with those commands (you will be prompted to enter the MySQL root password after the first command):
mysql -u root -p
create user '[DBUSER]'@'localhost' identified by '[DBPASSWORD]';
create database if not exists `[DBNAME]`;
GRANT ALL PRIVILEGES ON `[DBNAME]`.* to `[DBUSER]`@localhost;
Look up the according values of [DBUSER], [DBPASSWORD] and [DBNAME] in your /path/to/nextcloud/config/config.php
Never heard about “user Oc_rene” myself. You never mention where you inherit your copy of NC. We don’t ask just because it is 99.9999% irrelevant in general.
People helping out other people here are mostly volunteers. There are always paid service that serve one like a client. It is just not the way how forum works. People use more brain here.
NC is just a web application. It uses/manage database in the same way as wordpress, joomla, etc do. No magic.
ABC is:
one creates a database DEF in mysql, one creates a user GHI with password JKL in mysql, one grants GHI privileges to manage DEF in mysql. Then, one informs NC via config/config.php those name/key needed to utilize mysql. Clear?
Then, rename, copy, move, delete, … in whatever way you want. You want to keep the name Oc_rene? fine. You want to rename it? also fine. Just hold the ABC consist.