Installation problem with database username and nextcloud admin name

Support intro

Installation nextcloud 16 Last version of today

All works well. I have a screen where I have to enter nextcloud admin and password and database username and password and database name
I enter cloudadmin as admin name (I think I can choose what I want)
I enter database information. I check many times

And I got the error message

Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1044] Access denied for user ‘oc_cloudadmin’@‘localhost’ to database ‘nuageautrenet’

When I check the database a new user has been created oc_cloudadmin

of course this user did not existe. it is not as mysql user. Mysql user I entered was correct.

What did I do wrong.)

Do you need more info ?
I have debian stable and I have installed php7.3

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version 16.0
Operating system and version _debian stable
Apache or nginx version (eg, Apache 2.4.25): Apache
PHP version (eg, 7.1): php7.3

The issue you are facing:

I cannot finish installation. The installation screen display an error

Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1044] Access denied for user ‘oc_admincloud’@‘localhost’ to database ‘…’

Is this the first time you’ve seen this error? (Y/N): Y But I tryed few times. At first I thought I didn’t put the correct database name or database user or password

Steps to replicate it:

  1. Download the source from
  2. copy to the server.
  3. enter the usrl of the nextcloud site
    Enter admin : admincloud
    Enter a admin password
    enter mysql user
    enter mysql user password
    enter mysql database
    I let localhost without changing

I click the botton ‘terminer l’installation’

I check with phpmyadmin and notice that 2 new mysql users has been created
then at the next try I see

it is like a mysql user has been added with oc_ with nextcloud user.
The output of your Nextcloud log in Admin > Logging:
I don’t know what to put here I cannot log in.


The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):
<?php $CONFIG = array ( 'instanceid' => 'ocetkz52syw0', 'passwordsalt' => 'PAnIlQ1ny9WWYRYD+9cjMGmRtykqvb', 'secret' => 'u7otptwz+xVOKamy7aNarVha85EQ/Lk5iqL4kb22xqUqNyBG', 'trusted_domains' => array ( 0 => 'xxx', ), 'datadirectory' => '/xxx', 'dbtype' => 'mysql', 'version' => '', 'overwrite.cli.url' => 'xxx', 'dbname' => 'nuageautrenet', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => 'oc_admincloud', 'dbpassword' => 'xxx', ); ``` **as you see my config.php has oc_admincloud dbuser and in fact I put an other one the real one. Shall I change manualy that?** The output of your Apache/nginx/system log in `/var/log/____`: ``` PASTE HERE ```

Hello @kris1

Welcome to the Forum! :blush:

Could you please fill out the Form to give us the needed information for Troubleshooting?

Tx U and happy Nextclouding! :smile:

Sorry I am new in this forum. What form are you talking about?

Did you create any MySQL user?

Yes of course,

did you try this one in your config.php?

I tryed to change the config.php but I think I did a mistake because I have a white page. But I already installed nextcloud without changing anything in the config.php. All works perfectly.

Am I the only one who has problem installing nextcloud. ? It looks like a bug. Because he is creating mysql user.

on your screen capture, at the bottom, you have warning about missing php modules.

Maybee a failed server install for dependencies ?

Welcome to the forum!
There are possible troubleshooting steps.

  1. Make sure that the mysql server is up and running.
  2. Add the port that you run mysql to the end of “localhost” such that “localhost:xxxx”
  3. Make sure that all php extensions for database management are installed. “php-mysql, etc.”
  4. Make sure that the user created in mysq was created by at least root user and has the right privileges on the database.

If you have little or no experience (like me a year ago), when you’re setting Nextcloud for the first time it might feel like it’s never working, but believe that it will work. Take your time understanding and debugging detalis, it will be worth your time. Have a great experience.

Mysql runs well because I have other application php that needs mysql. phpmyadmin works too.

I created the mysql user with command line and add priviledges.

What port shall I add after localhost. I never did that when I previosly install nextcloud. I already installed nextcloud 15 or older and it was very easy to install.

Sorry for the late reply. You need to set it up in mysql settings it is my.conf in my setup.