MySQL 8.0.11 error connect to caching_sha2_password the specified module could not be found

I've tried to connect to the latest MySQL server 8.0.11 from MySQL workbench, but the error keeps popping up: Cannot connect to MySQL server, authentication plugin: caching_sha2_password: the specified module could not be found.

I tried looking at MySQL server installation videos online and replicated every step accurately, but the error persists.

Any help is greatly appreciated.


Solution 1:

I had the following solution: change my.ini in a [mysqld] section like this:

#default_authentication_plugin=caching_sha2_password  (comment line!)
default_authentication_plugin=mysql_native_password   (new line)

Connect to your MySQL under root in a command line client and execute:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxx';

Where xxx is your current password.

Solution 2:

Try to connect your MySQL use terminal, and use this.

mysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';