MySQL 8 安装后无法连接
问题描述:
mysql 无法连接 Unable to load authentication plugin 'caching_sha2_password'.
解决方法:
1、在MySQL的安装目录,执行cmd命令,然后在用MySQL的命令连接上数据库。
mysql -uroot -prootroot

2、执行以下4条命令
use mysql
alter user 'root'@'localhost' identified by 'rootroot' password expire never;
alter user 'root'@'localhost' identified with mysql_native_password by 'rootroot';
flush privileges;

注意:以上的rootroot是我安装MySQL数据库时设置的密码
浙公网安备 33010602011771号