MySQL just installed only to recognize the host is: localhost and 127.0.0.1, suppose you want to let your on-machine IP can log in normally there are two ways:
One is to authorize your IP 172.16.1.10.
Grant privileges on dbname.* to "user" @ "172.16.1.10" identified by "password";
If it's just your own use, you can write it like this.
Grant all on * * to "user" @ "172.16.1.10" identified by "password";
Grant details how to use the user manual for MySQL, assuming that this is not possible, it can only be authorized by the following methods
mysql> use MySQL;
Database changed
mysql> desc User; See how many fields you have
mysql> INSERT into user values (Val1,val2,....);
The second is to set the root user to be able to log in remotely, that is, to be able to login from whatever machine
mysql> use MySQL;
Database changed
mysql> Update user set host= "%" where user= "root";
Mysql>use MySQL
Grant all on * * to "root" @ "172.30.41.72" identified by "xcfg304";
Restart MySQL server
Method Three: Run directly in the MySQL database management background:
Use MySQL;
Grant all on * * to "root" @ "172.30.41.95" identified by "xcfg304";
MySQL just installed only to recognize the host is: localhost and 127.0.0.1