[---- MySQL database connection mysql 8] Error: authentication plugin 'caching_sha2_password

Error when just installed mysql8, using native connections

authentication plugin 'caching_sha2_password'...

First make sure the service is turned on, then enter through the cmd command mysql database localhost

mysql -hlocalhost -uroot -p123456

Then enter the mysql database

use mysql;

change Password

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
FLUSH PRIVILEGES;

Reconnect the database 

OK resolve

Guess you like

Origin blog.csdn.net/ningjiebing/article/details/93486288