XF 2.0 authentication method unknown to the client

m4771

Member
Hi there,

my forum is online since a few months. Yesterday was everything full functional.
But today I receive only an Error 500 when trying to access the forum.

Maybe you can help or have an Idea?
I tried to update the credentials. But it's still not working. But I can connect from commandline to the database with the same credentials.
I also tried to install the latest update package, but it's not working too, because of an error: "Oops! We ran into some problems. - The requested user could not be found." (Maybe because of the db issue which is visible in the apache log?)


Apache Error Log:
PHP Fatal error: Uncaught XF\\Db\\Exception: The server requested authentication method unknown to the client in src/XF/Db/Mysqli/Adapter.php:160\nStack trace:\n#0 src/XF/Db/Mysqli/Adapter.php(28): XF\\Db\\Mysqli\\Adapter->makeConnection(Array)\n#1 src/XF/Db/AbstractAdapter.php(51): XF\\Db\\Mysqli\\Adapter->getConnection()\n#2 src/XF/Db/Mysqli/Adapter.php(113): XF\\Db\\AbstractAdapter->connect()\n#3 src/XF/Db/AbstractAdapter.php(410): XF\\Db\\Mysqli\\Adapter->escapeString('options')\n#4 src/XF/Db/AbstractAdapter.php(388): XF\\Db\\AbstractAdapter->quote('options')\n#5 src/XF/DataRegistry. in src/XF/Db/Mysqli/Adapter.php on line 160

Error Message in Debug Mode:
An exception occurred: [XF\Db\Exception] The server requested authentication method unknown to the client in src/XF/Db/Mysqli/Adapter.php on line 160

  1. XF\Db\Mysqli\Adapter->makeConnection() in src/XF/Db/Mysqli/Adapter.php at line 28
  2. XF\Db\Mysqli\Adapter->getConnection() in src/XF/Db/AbstractAdapter.php at line 51
  3. XF\Db\AbstractAdapter->connect() in src/XF/Db/AbstractAdapter.php at line 73
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 91
  5. XF\Db\AbstractAdapter->fetchOne() in src/XF/Session/DbStorage.php at line 30
  6. XF\Session\DbStorage->getSession() in src/XF/Session/Session.php at line 53
  7. XF\Session\Session->start() in src/XF/App.php at line 669
  8. XF\App->XF\{closure}() in src/XF/Container.php at line 28
  9. XF\Container->offsetGet() in src/XF/Pub/App.php at line 39
  10. XF\Pub\App->XF\Pub\{closure}() in src/XF/Container.php at line 28
  11. XF\Container->offsetGet() in src/XF/App.php at line 2250
  12. XF\App->session() in src/XF/Pub/App.php at line 91
  13. XF\Pub\App->start() in src/XF/App.php at line 1927
  14. XF\App->run() in src/XF.php at line 328
  15. XF::runApp() in index.php at line 13

MySQL Version: 8.0.12
PHP Version: PHP 7.2.11
There was yesterday an update: PHP 7.2.10 to 7.2.11. But I couldn't believe that the error is caused be that. Because straight after the update the forum was still working.
Edit: Error is also occurring after switching to PHP 7.1.23.

Thanks in advance!
m4771.
 
Last edited:
Ok, after experimenting a bit I found a way to fix it...
It looks like the package php7.2-mysql had some changes. Because there was not mysql-update itself.

With executing ALTER USER '%FORUM_USER%'@'localhost' IDENTIFIED WITH mysql_native_password BY '%FORUM_PASSWORD%'; is the forum working again.
The suggestion in many Google search results to configure default_authentication_plugin=mysql_native_password for the mysql-server was not working.
 
FWIW, this is MySQL 8 specific (as it changed the password storage format), so presumably that was the upgrade that really triggered it.
 
Ok. That what what I also found with Google.
But I'm using MySQL 8 since my initial installation. Also PHP 7.2. That's why I couldn't imagine that this error was caused by an very small update (from php 7.2.10 to 7.2.11).

But thanks for your explanation :)
 
FWIW, this is MySQL 8 specific (as it changed the password storage format), so presumably that was the upgrade that really triggered it.
I troubleshooted it just now by using a newly created MySQL account for reading / writing XenForo database.
Root account is not expected to be used in such scenario.

macOS 11 & PHP8.0 & MySQL 8.0 & Apache 2 (macPorts).
 
Top Bottom