Error while creating Admin User

Hi Everyone,

I will start by saying Im very new to all of this, having followed tutorials to set up an unraid server im now trying to set up Nextcloud. I seem to be stumbling at a first hurdle after getting the docker nextcloud apps running. I navigate to the webui to create an admin user, but keep getting the following error:

Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user ‘nextcloud’@‘’ (using password: YES)

The ip address it lists isnt the one i enter for the local host, and the password wasnt ‘yes’. I have tried serveral times including completely deleting nextcloud docker and mariadb just in case i entered something incorrect but always the same error. I was following the spaceinvader one video on how to set this up.

With limited knowledge of linux, dockers etc im realy not sure where to turn, and I can only hope im describing the issue well enough! Any help or suggestions would be greatly appreciated. Sometimes its something very simple but I may have simply overlooked it!


Ok, as usual I’ve managed to get it working after I post for help! Hours and hours trying everything, always the way.

For anyone searching for this in the future, first step was to delete mariadb, then manually go in and delete the remaining files. I did this by exporting the appdata sharing, then going in through windows and just deleting. If you have a file manager app installed I’m sure it could be done that way as well.

Reinstalled mariadb, in the logs umask was being changed from 022 to 0640 so manually changed this in mariadb settings (not sure what difference that makes) and this got rid of the error listed above but instead gave me and login access denied error. The usernames and password were correct even though it said it didn’t match or exit (sorry i cant remember the exact wording now).

To fix this i manually created a new user, password and granted permisions in the console using the following commands. ONLY replace the italic sections with just your info. After each line hit enter.

mysql -uroot -p


CREATE USER ‘yournewusername’ IDENTIFIED BY ‘yournewpassword’;

GRANT ALL PRIVILEGES ON yourdatabasename.* TO ‘yournewusername’ IDENTIFIED BY ‘yournewpassword’;


I cant pretend to know exactly why this worked for me, but it did. I tried granting all privileges to the original user i made but no luck, this worked first try.

Hope it helps someone else out!