mysql[HY000][2054] the server requested authentication method unkonwn to client (caching_sha2_password)

rtsiresy

Member

Reaction score: 1
Messages: 62

Hey all,
So I ve got FEMP (nginx , mysql80 and php72)pack installed on freeBSD 11.2 and everything configured correectly;
... I copied my webapp in and imported the .sql file ... no problem ...
but then when I took my windows laptop to test it ... it prints the above message ...
Please any help would be welcome ...
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 10,745
Messages: 36,545

OP
R

rtsiresy

Member

Reaction score: 1
Messages: 62

oh ... thanx ... was digging around for hours about that probem ... okay i' ll try this tomorrow as the server is at my workplace ... i' ll post for the result ...
thank you again ...
 

Emrion

Aspiring Daemon

Reaction score: 160
Messages: 567

Fall in this problem recently. You have to configure MySQL as SirDice show you, but you have also to change the authentification method of the user(s) you created.

You need to use mysql command line utility and commit a sql query. Something like:
ALTER USER user IDENTIFIED WITH mysql_native_password BY 'password';
Adapt user and password.
 
OP
R

rtsiresy

Member

Reaction score: 1
Messages: 62

Sorry guys, I took a while. It was because internet connection at work was cut for a week but now I'm back.
And to continue the discussion, I did all the thing you guys asked me to do; and yes it fixed the error.
But then a new error related to sql_mode stuff has taken the place.
I guess I'm just going to switch to mysql57.
 

sean137

New Member

Reaction score: 1
Messages: 14

I seem to still have this problem today, with:
  • FreeBSD 12.2-RELEASE-p1
  • mysql 8.0.22
  • PHP 7.4.13
The workaround of using mysql_native_password of course still works.

But everything I've read suggests that after the last two years, the PHP mysqli connector now supports caching_sha2_password. Yet in my phpinfo() output, in the list of supported authentication methods in the "Loaded plugins" row of the "mysqlnd" section, I don't see caching_sha2_password listed. Do others see it listed?
 
Top