mysql -u root -p
mysql>use mysql;
mysql>select user,host from user;
mysql>update user set host = '%' where user ='root';
mysql>flush privileges;
mysql>select user,host from user;
mysql -u root -p
mysql>use mysql;
mysql>select user,host from user;
mysql>update user set host = '%' where user ='root';
mysql>flush privileges;
mysql>select user,host from user;