After upgrading from mysql to mariadb I started getting these error messages, and my Drupal site is down saying The website encountered an unexpected error. Please try again later.

environment:
php 7.3.33
MariaDB Server version: 10.6.7-MariaDB MariaDB Server
Drupal 9.3.7

There was a big update to MariaDB authentication recently https://mariadb.com/kb/en/authentication-from-mariadb-104/

[Sun Mar 06 07:01:32.189260 2022] [fcgid:warn] [pid 24978] [client 84.236.113.153:40391] mod_fcgid: stderr: PDOException: SQLSTATE[HY000] [1275] Server is running in --secure-auth mode, but 'xxxx'@'localhost' has a password in the old format; please change the password to the new format in /home/xxx/public_html/xxxx/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php on line 79 #0 /home/xxxx/public_html/xxxx/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(416): PDO->__construct('mysql:host=loca...', 'xxxxxx', '1234567', Array)

Tried this recommendation but no luck http://www.mysqlab.net/knowledge/kb/detail/topic/error+messages/id/5377

I also just tried installing a brand new Drupal site, and it is failing like so

Resolve all issues below to continue the installation. For help configuring your database server, see the installation handbook, or contact your hosting provider.
Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file.
Is the database server running?
Does the database exist or does the database user have sufficient privileges to create the database?
Have you entered the correct database name?
Have you entered the correct username and password?
Have you entered the correct database hostname and port number?
CommentFileSizeAuthor
#3 mariadb.png272.17 KBgiorgio79

Comments

giorgio79 created an issue. See original summary.

giorgio79’s picture

Status: Active » Closed (works as designed)

This seems to be a Mariadb issue so closing

giorgio79’s picture

Issue summary: View changes
Status: Closed (works as designed) » Active
StatusFileSize
new272.17 KB

Reopening as I just tried installing a brand new Drupal site, and it is failing like so
environment:
php 7.3.33
MariaDB Server version: 10.6.7-MariaDB MariaDB Server
Drupal 9.3.7
There was a big update to MariaDB authentication recently https://mariadb.com/kb/en/authentication-from-mariadb-104/

Resolve all issues below to continue the installation. For help configuring your database server, see the installation handbook, or contact your hosting provider.
Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file.
Is the database server running?
Does the database exist or does the database user have sufficient privileges to create the database?
Have you entered the correct database name?
Have you entered the correct username and password?
Have you entered the correct database hostname and port number?
giorgio79’s picture

Status: Active » Closed (works as designed)

Huhh, managed to solve it with this one https://stackoverflow.com/questions/8831183/error-mysqlnd-cannot-connect...

weird mysql / mariadb issue