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: https://www.howtoforge.com/how-to-install-nextcloud-on-debian-11/
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!

Best,
itsmydata

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!

https://help.nextcloud.com/search?context=topic&context_id=148635&q=Error%20while%20trying%20to%20create%20admin%20user%3A%20Failed%20to%20connect%20to%20the%20database%3A%20An%20exception%20occurred%20in%20the%20driver%3A%20SQLSTATE%5B&skip_context=true

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