mysql -u root -p
use mysql;
select host,user from user;
grant all privileges on *.* to root@'%' identified by "你的密码";
flush privileges;
或者参考
https://www.cnblogs.com/m97i/p/7586628.html
https://blog.youkuaiyun.com/liurongsheng123/article/details/80447323