Error (1) : #2054 - The server requested authentication method unknown to the client
Error (2) : mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]
Fix In Linux :
First you should find my.cnf.
Edit my.cnf.
Add at the end :
[mysqld]
default_authentication_plugin=mysql_native_password
Exit Editor and restart MySQL :
sudo service mysql restart