The server requested authentication method unknown to the client

I’m trying to install on fedora 28 running apache2 (httpd) with php7.2.
When I enter my details on the install page, I get the following error:

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

I’ve been searching for an answer, and there seems to something with the hash length of the password string, but I am unable to verify this. Does anybody have an idea about how to solve this?
Thanks

bad user/password

Mysql version please.

Default authenticate of MySQL 8.0.4 changed.

If 8.0.4 then https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-4.html

1 Like

Mysql version is 8.0.4, as you suggested. I took a good look at your link and it helped me find a solution.
I had to change the default authentication method in /etc/my.cnf to mysql_native_password and restart the server. Then I created a new database and user with the new settings, and now it works.
Thank you very much for your help stratege1401.

1 Like

One note with this change also that had me stumped for a good while was that i also needed to update my nextcloud database user to use mysql_native_password also

ALTER USER 'nextcloud'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';