Docker数据库允许外网访问

Scroll Down

查看用户信息

select host,user,plugin,authentication_string from mysql.user;

  host为 % 表示不限制ip localhost表示本机使用 plugin如果不是mysql_native_password 则需要修改  

ALTER user 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';

FLUSH PRIVILEGES;