假设mysql设置的<container name>为mysql01
docker exec -it mysql01 /bin/bash
mysql -u root -p
host为 % 表示不限制ip localhost表示本机使用 plugin非mysql_native_password 则需要修改密码
select host,user,plugin,authentication_string from mysql.user
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
Comments NOTHING