Whilst trying to install or use PHPMyAdmin, you might encounter the following errors:
mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password] mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client
The reason why this happens is because of authentication method changes in later version of MySQL.
TL;DR
Change
# mysql -u root -pPASSWORD
First syntax (depends on version of MySQL):
mysql> ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'user_password';
or
mysql> ALTER USER root IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
There are other ways of doing this as well, so be sure to follow the reference below if you want the complete story.
Reference:
https://stackoverflow.com/questions/49948350/phpmyadmin-on-mysql-8-0
3 thoughts on “PHPMyAdmin error requested authentication method unknown to the client [caching_sha2_password]”
This is the only thing that fix my problem. Thank you.
Nice One dude
Thanks a lot lot lot,
This fix my problems.
Thumbs up!