Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 893
MT32 Avatar asked May 04 '18 07:05

MT32


People also ask

What is MySQL caching_sha2_password?

In MySQL 8.0, caching_sha2_password is the default authentication plugin rather than mysql_native_password . For information about the implications of this change for server operation and compatibility of the server with clients and connectors, see caching_sha2_password as the Preferred Authentication Plugin.

Where do I find my ini?

The my. ini is in hidden folder of program data. First go to C: drive and then hidden folder of program data.

What security improvements are added in the new version of MySQL?

MySQL now supports stronger encryption for user account passwords, available through an authentication plugin named sha256_password that implements SHA-256 password hashing. This plugin is built in, so it is always available and need not be loaded explicitly.


2 Answers

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.

like image 114
vikentiy Avatar answered Oct 14 '22 04:10

vikentiy


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

mysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';
like image 21
Sukma Saputra Avatar answered Oct 14 '22 04:10

Sukma Saputra