error solution of MYSQL Based the ERROR 1130: Host is not allowed to connect to this MySQL server

MySQL ERROR 1130: Host 'XXXXXX' is not allowed to connect to this MySQL server.

The two solutions of this problem:

Method One:

Execute the command:

The SQL code
mysql> GRANT ALL PRIVILEGES ON *. * TO 'root' @ '%' IDENTIFIED BY '123456 'WITH GRANT OPTION;

mysql> GRANT ALL PRIVILEGES ON *. * TO 'root' @ '%' IDENTIFIED BY '123456 'WITH GRANT OPTION;

Description:

Enter this command and press Enter to allow all to use the root user and enter "123456" password of the host to log in to the the mysql Server

If the '%', then replaced with an IP address, then only that the IP address of the host in order to root the connect to the MYSQL Based Server.

Method two:

Execute the command:

The SQL code
mysql> use mysql;

mysql> the update user set host = '%' where user = 'root';

mysql> use mysql;

mysql> the update user set host = '%' where user = 'root';

Description:

Change the "mysql" database "user" table "host" "localhost" value to "%"



This address is http://www.computerites.com/database-knowledge/2012/03/error-solution-of-mysql-based-the-error-1130-host-is-not-allowed-to-connect-to-this-mysql-server-455.html