Navicat create (connection) MySQL database shows: Authentication plugin 'caching_sha2_password' can not be loaded

Foreword

After a period of time before re-finish system is not installed MySQL database, just install Navicat, and later when needed, install the MySQL database, and reset the settings, remember to reset the password after a null value. Today, when in use, there has been prompt that appears in the title, let's solve it!

solution

① an administrator to enter the command window, type:

mysql -u root -p      //登录MySQL
password      //输入密码

② modify the encrypted account password rules and update the user password

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;   //修改加密规则

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';   //更新一下用户的密码

③ permissions refresh

FLUSH PRIVILEGES;   //权限刷新 

④ password reset

alter user 'root'@'localhost' identified by '123456';     //重置成自己想要的密码(我的密码为:123456)

After the above operation is complete, close Navicat reopen, and then create (connection) MySQL database will be a success!

to sum up

And a summary, but also learn a trick, can be described as more difficult, more ways, hoping to be helpful to everyone!

Published 140 original articles · won praise 106 · views 190 000 +

Guess you like

Origin blog.csdn.net/tigaobansongjiahuan8/article/details/103452696