Workaround:
1. Change the table method.
It may be that your account is not allowed to log on remotely, only on localhost. This time, as long as the computer on the localhost, log in to MySQL, change the "MySQL" Database in the "User" table "host", from "localhost" to "%"
Mysql-u root-p
Enter Password:
Mysql>use MySQL; --Open Database
Mysql>update User Set host = '% ' where user = ' root ';
Mysql>select host, user from user;
2. Authorization law.
For example, if you want to myuser use MyPassword to connect to a MySQL server from any host.
Mysql>grant all privileges on * * to ' myuser ' @ '% ' identified by ' MyPassword ' with GRANT OPTION;
Mysql>flush privileges; --Refresh Permissions
If you want to allow users to connect to the MySQL server from a host myuser IP 192.168.1.6 and use MyPassword as the password
Mysql>grant all privileges on * * to ' myuser ' @ ' 192.168.1.3 ' identified by ' MyPassword ' with GRANT OPTION;
Mysql>flush privileges;
If you want to allow users to connect to the MySQL server 's DK database myuser from the IP-192.168.1.6 host, and use MyPassword as the password
Mysql>grant all privileges on dk.* to ' myuser ' @ ' 192.168.1.3 ' identified by ' MyPassword ' with GRANT OPTION;
Mysql>flush privileges;
Error: 1130-host allowed to connect to this MYSQL server