Installation fails


I tried to install nextcloud with the setup-nextcloud.php but have an error when creating the database.

mysql Ver 8.0.16

PHP 7.3.7 (cli) (built: Jul 3 2019 11:30:22) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.3.7, Copyright © 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.3.7, Copyright © 2002-2019, by ionCube Ltd.
with Zend OPcache v7.3.7, Copyright © 1999-2018, by Zend Technologies

I get
Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

mysql> SELECT User, Host, plugin FROM mysql.user;
| User | Host | plugin |
| root | | mysql_native_password |
| root | ::1 | mysql_native_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session | localhost | caching_sha2_password |
| root | localhost | mysql_native_password |
| roundcube | localhost | mysql_native_password |

Must have something to do with the mysql version. Tried also
mysql> CREATE USER ‘tester’@’%’ IDENTIFIED BY ‘tester’;

and get
| test | % | caching_sha2_password |

but creating the database with root or tester fails.

What can be done to resolve this. When I use mysqladmin I can create a database as user root on the commandline.

Correction: The database is created but it remains empty.


You should not have to do any of that prior to installing. You give Nextcloud the server and SQL root login in the web setup wizard, and it creates the database itself.

That’s the problem. I did not modify anything before installing. I tried to install natively and got the error above. Don’t know. I can connect to mysql with the browser via mysqli_connect test.php.
But nextcloud does not fill up the tables of the database it created.


If Nextcloud was unable to properly access the database before it was populated, it stands to reason it might have the same problem after. I would double check all of that first. Make sure you can run mysql from your Nextcloud server and get logged in as root.

As I said, I have no problems connecting to mysql on the commandline and installing other applications. Nextcloud fails to install.

Are you installing from the zip file?

Now I used the setup-nextcloud.php webinstaller and it worked. Can’t believe it. Thanks for your patience!