Another fix for error "Authentication plugin 'caching_sha2_password' cannot be loaded"

I already posted a Fix MySQL error "Plugin caching_sha2_password could not be loaded".
For some reasons the ALTER statement failed and I used to find another fix for this problem.

Add to my.cnf the following in the [mysqld] section:

[mysqld]
default_authentication_plugin=mysql_native_password
And restart MySQL