Database error after reinstalling Nextcloud

Probably caused by password mismatch between the password stored in mysql for nextcloud user and the password used to connect to the database (stored in /var/lib/nethserver/secrets/nextcloud).

Are you intending to do a new clean install (as you removed the database) or to recover the old one (importing database from backup, fixing mysql’s nextcloud user password and the password stored in secrets/nextcloud file to match…)?

If the former, one option could be to remove nextcloud user from mysql and remove secrets/nextcloud file, and then run yum reinstall nethserver-nextcloud (the rpm package will recreate both but with new credentials). For a full reinstall you have instructions on the manual:
https://docs.nethserver.org/projects/nethserver-devel/en/latest/nethserver-nextcloud.html#full-reinstall

  1. Uninstall Nextcloud using the admin page
  2. Drop the MySQL database: /opt/rh/rh-mariadb105/root/bin/mysql --socket="/var/run/rh-mariadb105-mariadb/nextcloud-mysql.sock" -e "drop database nextcloud;"
  3. Remove the packages: yum remove nethserver-nextcloud
  4. Remove the whole Nextcloud directory: rm -rf /usr/share/nextcloud/
  5. Remove the e-smith DB configuration: config delete nextcloud
  6. Remove the NethServer config directory (WARNING: will remove user data): rm -rf /var/lib/nethserver/nextcloud
  7. Install Nextcloud from the Software Center