The server requested authentication method unknown to the client (SQLSTATE[HY000] [2054])
This error occurs because of mysql database uses caching_sha2_password so to get rid of this problem we should run.
ALTER USER 'yourusername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword';
It will change identification of password and solve the problem.