错误截图:
步骤:
1:进入容器内部
```docker exec -it 3acaaaced362 /bin/bash
2:登陆mysql
mysql -u root -p;
3:切换数据库
use mysql;
4:查看root权限
select host,user,plugin,authentication_string from mysql.user;
```
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
执行成功后
查看权限:select host,user,plugin,authentication_string from mysql.user;
尝试登陆 成功