Install Wizard Database Errors (Access Denied for Root)

I am trying to install nextcloud but can’t get past the Install Wizard.

I have successfully installed owncloud twice on this server, so am a bit confused as to why the installation is not working now.

Here is my error message:


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

Any thoughts? I’ve logged into mysql to double check my password, so it’s hard to believe that’s the issue.

Could you provide us some more details of your Server and configuration, so that we may reproduce this :wink:

Apologies! Raspberry Pi 3, Raspbian Jessie, Nginx, MySQL, PHP5, Nextcloud

I can get specific versions tomorrow morning – have spent all night on
trying to get my own cloud running (background here:;
did not know about NextCloud until a few hours ago).

Please let me know if there is any other information I can provide.

Update: 20160901 1100 UTC
Raspbian 8.0 Jessie
nginx version: nginx/1.6.2
PHP 5.6.24-0+deb8u1

It seems I Have the same issue: same error message … and sorry but no solution !

My installation is on a remote web space.
Web server is Apache
DB client version is libmysql - mysqlnd 5.0.12-dev - 20150407
PHP version is 7.0.10-1~dotdeb+8.1
DB server is MySQL-MariaDB 5.5.42-MariaDB-cII-Ive.

I had the same message when I first tried to install owncloud (8.2 I think) a few months ago, and couldn’t solve it - neither on owncloud’s forums neither on my webspace provider’s helpdesk - untill came ownCloud 9.0.1.
It happened since (in July) thaty my owncloud occurence crashed … so I considered going to nextcloud but tried first to make a new install of owncloud 9.2.
But both attempts (with owncloud 9.2 and with nextcloud 10.0.0 come to the same error message !

Has anybody be able to find a solution? I believe this is a bug.
All my versions are within the requirements.
I can connect via mysql client to the database machine without problems. With the root account and with an special nextcloud admin user. I’m also hosting an Owncloud 8 istance DB. I tried that user too and didn’t worked. I have also installed several Wordpress sites and I have had never a connection problem until now with Nexcloud.

Please help me on this issue, I have the same problem.

CentOS Linux release 7.2.1511
Apache 2.4.6
MariaDB 5.5.50
PHP 5.6.28
Nextcloud 10.0.1
phpMyAdmin 4.6.4

I have tried some solutions such like “change Mariadb password without any special characters (#$%*!@…”, add “binlog_format=mixed and
transaction-isolation=READ-COMMITTED into my.cnf under [mysqld] section”

I can sign on mariadb via in terminal and I can access phpMyAdmin.

But I don’t know why I get the following error message:

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

I don’t see any error message in db log and nextcloud.log is empty under data folder.

Please help me, I would like to setup my own cloud.

Thank you in advance.

Best Regards,
Bruce Cheng

I had the same issue with:

  • CentOS NGINX PHP 5.4
  • CentOS NGINX PHP 5.6
  • CentOS NGINX PHP 7
  • CentOS Apache PHP 7

I fixed it by putting back :
into /etc/php.ini

I also modified my security.limit but it’s optional
security.limit_extensions = .php
into /etc/php-fpm.d/www.conf

this post gave me the idea : Access denied on nginx


Maybe that can help (if you work with root). I had that with MariaDB
PS: working with root is not recommended

Please check in de Database mysql and table user.

For example:

if you have the “unix_socket” plugin → only allow form unix.

Add an other user and give them all premissons to the database (exept GRANT)

And try again.

check also the nextcloud/config/config.php

LINK: Creating Admin account failed - #4 by ham

Try with the masks turned on for the pass fields. The passwords should not be visible and it works for me.

Please, don’t ask me how much time did it take me with an installation, which worked accidentally. At the end I believed I fixed it doing some magic commands, changing the authentication plugin with these commands (substitute the user/pass fields):

mysql -u root -p
UPDATE mysql.user SET authentication_string = PASSWORD(‘putyourpasswordhere’), plugin = ‘’ WHERE User = ‘nextclouduserOrYourUser’ AND Host = ‘localhost’;
flush privileges;

Now I’m doing another installation and after doing these commands, it didn’t work. Then I thought if the masks I turned off for the password fields (so I’m sure the passwords are right) are braking things and sending the wrong passwords. So I turned them back on and it worked.

I suppose the above commands are not necessary, but will be glad if someone confirms.

Installing new Nextcloud 11.0.0 on Ubuntu 16.04.1 brand new installation.


I had the same problem, opened an issue here