Host is not allowed to connect to this MySQL server

if you are trying to connect to mysql this error occurs:

ERROR 1130: Host ‘192.168.1.3’ is not allowed to connect to this MySQL server

1. Change table method. Maybe your account doesn’t allow you to log in remotely, only at localhost. At this point, as soon as you log in to mysql on your localhost computer, change the “host” entry in the “user” table in the “mysql” database, and change the “%”

from “localhost”

mysql -u root -p

mysql> use mysql;
mysql> update user set host = ‘%’ where user = ‘root’;
mysql> select host, user from user;

2. Authorization method. For example, if you want myUser to use MyPassword to connect to a mysql server from any host.

GRANT ALL PRIVILEGES ON *.* TO ‘myuser’@’%’ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;
if you want to allow user myuser to connect to mysql server from a host with IP of 192.168.1.3, and use mypassword as the password

GRANT ALL PRIVILEGES ON *.* TO ‘root’@’192.168.1.3’ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO ‘root’@’192.168.1.3’ IDENTIFIED BY ‘1235’ WITH GRANT OPTION;

mysql> flush privileges; This sentence must add!!

Read More: