https://blog.csdn.net/dengjin20104042056/article/details/95091506

方法二:

step1: 修改表user

mysql> use mysql;

mysql> update user set host = ‘%’ where user = ‘root’;

mysql>flush privileges;