This means that the nextcloud/owncloud login user is already existent, so not be confused about the database user its just the login user for nextcloud and same appears on owncloud. ive had it running on kubernetes and everytime i deleted the pod and it relaunched it appeared that the username was already in use. All you need to do is to delete the user you log into the cloud.
For example if you use “admin” as user to login to nextcloud or owncloud then do this:
(you might need to replace owncloud with nextcloud and oc_ with nc_ just double check the database name, prefix and tables)
Check Databases:
SHOW DATABASES;
Select the Database you need to edit:
USE owncloud;
Self explanatory:
SHOW TABLES;
Select all from table oc_users or nc_users if nextcloud:
SELECT * FROM oc_users;
Delete the admin user inside table oc_users or nc_users depending on installation, also deleting from accounts and groups:
DELETE FROM oc_users
where uid = ‘admin’;
DELETE FROM oc_accounts
where user_id = ‘admin’;
DELETE FROM oc_group_user
where gid = ‘admin’;