问题分析:
虚拟机启动数据库,使用数据库软件连接遇到plugin caching_sha2_password could not be loaded错误
问题搜索:虚拟机如何连接MySQL
问题解决:
(1)先进入mysql容器:
docker exec -it mysql bash
(2)使用远程命令登录mysql
mysql -hlocalhost -uroot -proot -P3306
(3)操作数据库
use mysql;
(4)修改root用户身份验证的插件
本地插件:
alter user root@localhost identified with mysql_native_password by '123456';
FLUSH PRIVILEGES;
远程连接:
alter user root@'%' identified with mysql_native_password by '123456';
FLUSH PRIVILEGES;
(5)再次连接,问题解决