解决ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL server

1. Change the table method. It may be that your account is not allowed to log in from the remote, only on localhost. At this time, as long as you are on the localhost computer, after logging in to mysql, change the "host" item in the "user" table in the "mysql" database, from "localhost" to "%" 
mysql -u root -pvmwaremysql>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 connect to the mysql server from any host using mypassword. 
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 host with ip 192.168.1.3 and use mypassword as password 
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY 
'mypassword' WITH GRANT OPTION; 
 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326720887&siteId=291194637