菜单

波波
发布于 2020-08-04 / 0 阅读
0

Docker数据库允许外网访问

查看用户信息

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;