Stuck at initial setup - creation of database admin users fails

Hi all,

This is my first time trying to install Nextcloud. Everything worked so far (O. K., after some rework). Now I am stuck at the first screen in the browser where the NC config asks for data to create NC admin user and to set up the database and database user.

I am getting two different error messages between numerous attempts:

  • “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 ‘nextclouduser@localhost’@‘localhost’ (using password: YES)”; I also got the message with only user “‘nextclouduser@localhost’”
  • “MySQL-Benutzername und/oder Passwort ungültig Du musst Details von einem existierenden Benutzer einfügen.” (roughly translates as “MySQL user name and/or password invalid. You must insert credentials of an existing user.”

I am entering the credentials of a user that I have previously set up in MariaDB. I can log into database administration with those credentials (mysql -u nextclouduser -p). So wrong credentials should not be an issue. The user also has full privileges on the database (nextcloud_db) that I have already created.

I have also tried with out pre-creating the database or using the DB root user. That didn’t work either.
I have removed all special characters from the database user’s password (found that tip in the NC forum), but that didn’t help.
Also found the tip to install phpMyAdmin to check the database, but didn’t do as I cannot see the benefit.

For the whole installation, I used the following tutorial:
I have installed the following software:

  • Debian GNU/Linux 10
  • Apache 2.4.38
  • MariaDB 10.3.36
  • PHP 8.1.12

Has anybody got any ideas what to do/try - before going for a complete reinstall?
And as always: yes, I’ve searched both the forums and the Internet extensively before posting, found lots tips, but nothing that helped.
Thanks much!


Did you notice you are using Debian 10 when the guide you linked to is asking for Debian 11.

Please spell out the actual steps you’ve taken so we can easily follow along without digging through the linked guide. Thanks!

Thanks, just!

Matter of fact I did. I didn’t (don’t?) expect that to make much of a difference. I guess I may be wrong. Edit: Looking at the tutorial webpage, it has a version for Debian 10, too. I might have used that. Did that a few weeks back and have been trouble-shooting the issue off and on since then, so unfortunately not quite sure.

Can do. Will add that soon. If anyone’s got another idea in the meantime, that’d be greatly appreciated.

Your post is missing a lot of specific technical information. Thanks for your post, but please take a little time to get acquainted with the forum and make a stronger effort to troubleshoot. It is the least you can do when asking others to help you:

  • Search your question as keywords on this forum. If you find something useful, link it directly into this post.
  • Search the internet using your issue as generic keywords. Specificity is king:
    • php modules missing Ubuntu Snap update
  • If you have an error message, repeat this process to search for your error on the forum and internet.
  • If you do not find an answer, you are likely using the wrong keywords. Try simplifying your search on the forum and internet even more.
    • nextcloud php modules missing
      Once you’ve done this you should be able to edit and update your post with specific technical information we can use to help you.
  • Check Nextcloud admin documentation

Edit and update your post to include:

  • Direct Links to any useful info pages, posts and other info you find.
  • Add screenshots to your post for context
  • If you have large log files to attach you can link to a pastebin
  • Fill out our support form and add into your post.

These are the exact same steps we volunteers will be following to help you! So, get to it!

This is an example you can search here on the forum and internet at large. Repeat for each generic error you encounter.