Issue: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

Hello,

I don’t believe the issue was answered before, otherwise I am sorry.
I am the newly person in charge of two archive websites of a research institute.
http://archivis.ifea-istanbul.net/
http://map-archivis.ifea-istanbul.net/

Sadly, the following message appeared recently which makes our websites unreachable:
" Install Omeka S
Some installation requirements were not satisfied.
An exception occurred in driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client."

I am not familiar with the Omeka S at all, but willing to learn to maintain the websites. The person who created a long time ago the website has moved on years ago, so she cannot help.

What could be the solutions ?

Thank you very much !
Guillaume Gug
IFEA

Which version of MySQL/MariaDB are you using exactly?

By default, MySQL 8.0.x uses auth_socket instead of the “normal” password-based authentication.

To fix this, enter the mysql shell with the root user and run the following command:

ALTER USER 'your_omeka_database_user'@'localhost' IDENTIFIED WITH mysql_native_password
BY 'your_super_secret_password';

Afterwards, authentication using username and passwort should be possible again.

Even though this Query is genereally save, I think this is a good opportunity to ensure that your backups are up-to-date and validated.

EDIT: You also might have to modify your MySQL configuration settings:

[mysqld]
default-authentication-plugin=mysql_native_password

Yeah, I would hazard a guess that it’s actually something to do with MySQL 8’s caching_sha2_password instead, but it’s the same basic problem. What probably has happened is that the database that runs these sites was upgraded to a newer version.

@felsqualle’s suggestion changes the user to use the older and widely compatible “mysql_native_password” authentication, and that should work as long as you have access to the database and sufficient permissions to make that change. If the issue is that the user is set to use auth_socket for authentication, then you’d have to do this, or at least something quite similar.

Alternatively, if the user is set to use caching_sha2_password, it’s likely possible to upgrade your PHP and/or MySQL client libraries to support the auth used here. PHP 7.3 and older don’t support caching_sha2_password with their built-in “native” MySQL driver, so if you’re using that old of a PHP, just updating to 7.4 or newer should resolve it.

Hello, sorry for the delay to reply as I tried to understand what to do and get answers from former colleagues.

Sadly, I have no idea on how to access the Omeka server and to do these changes. Our archive websites are hosted on Huma-Num, from what I was told.

I contacted Omeka and Huma-Num.

But just in case, is there a guide ? A solution ?

Thank you !
Guillaume