Hey there, yes I accidently introduced this bug with the last update. As database users were not removed in the past on uninstall, it slipped through tests.
Yes Nextcloud installation is under heavy rework, but this should not affect running systems, I will do way more testing an careful review before touching running systems again. So deeply sorry for that!
Simplest solution to fix database access is just to regrant access for the user, your nc instance uses, which should be oc_admin@localhost:
$ mysql -uroot -pdietpi -e "grant all privileges on nextcloud.* to 'oc_admin'@'localhost'"
You could also create a new user with that privilege just named oc_admin without host appendix, which will automatically bequieth it's privileges to oc_admin@localhost, to totally restore the situation before bugdate:
$ mysql -uroot -pdietpi -e "grant all privileges on nextcloud.* to 'oc_admin' identified by '<password_from_config.php>'"
Giving Nextcloud root user access to database (set root and dietpi as dbuser and dbpass in config.php) is not recommended due to security reasons and will further not work for MariaDB setups.
Here PR to fix creation of bug and installation problems on MariaDB: https://github.com/Fourdee/DietPi/pull/1242
I am not yet sure if I should actually fix running systems on update or expact users to fix it by themself. I guess most users want to have their nc running fast again instead of waiting for next dietpi-update, or what you think?