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.
# mysql -u root -pPASSWORD
First syntax (depends on version of MySQL):
mysql> ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'user_password';
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.