Solved: "authentication method unknown" during installation

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Locked
hadg
New Member
New Member
Posts: 1
Joined: Sun Aug 18, 2019 6:31 pm

Solved: "authentication method unknown" during installation

Post by hadg »

Hi,

I ran into the following issue while installing CMSMS 2.3-beta6 on a CentOS 7 server, with Apache 2.4, PHP 7.3 and MySQL (Percona) 8.0.15. I installed from the PHAR file, i.e., cmsms-2.3-beta6-install.php.

After I created a MySQL user and database for CMSMS, I entered these details in the corresponding screen in the installation process, and got the following error:
The server requested authentication method unknown to the client
I found out that MySQL changed the default authentication plugin from mysql_native_password to caching_sha2_password as of version 8.0.4. You can read more about this here:
https://dev.mysql.com/doc/relnotes/mysq ... 8-0-4.html
https://dev.mysql.com/doc/refman/8.0/en ... 2-password

This has no effect when MySQL is upgraded in place for an existing CMSMS installation. The problem arises when a new database user is created, in MySQL version 8.0.4 or later.

Workaround:

Code: Select all

mysql> CREATE USER 'cmsuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourPasswordHere';
This creates a database user while expressly selecting mysql_native_password authentication.

I trust that future versions of CMSMS (or perhaps I should say, future versions of the PHP MySQLi extension?) will support the newer SHA2 authentication mechanisms.

I am posting this here in hope that it may be useful to someone. I am new here, so if I posted in the wrong place then please point me in the right direction.

Cheers!
H.

P.S. The eagle-eyed reader may have noticed that I'm on PHP 7.3, while CMSMS 2.3 officially calls for <=7.2. I'm pleased to say I've had no issues so far.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Solved: "authentication method unknown" during installat

Post by calguy1000 »

quick research says that the mysqli extension to PHP does not support this (yet).
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “Tips and Tricks”