从Docker登录MySQL的终端
docker exec -it wordpress-mysql /bin/bash
登录数据库
mysql -u root -p
使用MYSQL数据库
use mysql
查询MYSQL的root用户情况
select host, user, plugin from user;
修改root用户插件验证方式
ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘xxxxxxxxxx‘;
刷新权限
FLUSH PRIVILEGES;