Solution:
After logging into mysql, change the "host" item in the "user" table in the "mysql" database, and change it from "localhost" to '%'.
Steps:
Execute command mysql -u root -p
execute use mysql
execute update user set host = '%' where user = 'root';
execute FLUSH PRIVILEGES;
permission to refresh the table
in the implementation of the third step will complain, do not control, direct the implementation of the fourth step, then you can connect the