In MySQL 8.0 caching_sha2_password is the default authentication plugin rather than mysql_native_password. This required many changes in the applications which trying to connect to database.
This article explains the steps to change back to the mysql_native_password plugin.
Step1: Open MySQL config.
Step2: Update the following lines under "[mysqld]" and save.
Step3: Restart MySQL
If some users already created with caching_sha2_password, we can use the alter command to modify it.
ALTER USER 'username'@'host' IDENTIFIED WITH mysql_native_password BY 'password';
Here we need to replace the values of username, host and password with the corresponding data.