docker下mysql 出现mbind:Operation not permitted

发布于 2020-08-14  6206 次阅读


假设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';