در mysql 8.1 چنانچه خطای ذیل هنگام ورود به phpmyadmin نمایش داده شد اقدام زیر را انجام دهید:
خطا:
mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]
اقدام:
در کنسول mysql دستور زیر را واردکنید:
1- Log in to MySQL console with root user:
mysql -u root -p PASSWORD
And type the root's password to auth.
2- I created a new user:
mysql> CREATE USER 'user'@'%' IDENTIFIED BY 'password';
3- Grant all privileges to the new user:
mysql> GRANT ALL PRIVILEGES ON *.* To 'user'@'%';
4- Change the Authentication Plugin with the password:
mysql> ALTER USER user IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
Now, phpmyadmin works fine logging the new user.