foreword
Linking to someone else's database today, I found an error:
message from server: “Host ‘’ is not allowed to connect to this MySQL server”
The strange thing is that we are in a local area network, and the ip segments are all the same.
The pin ip is also fine, but the port 3306 is blocked
I checked some information on the Internet and finally found that it was because of database permissions.
Let me share my solution
Solve the problem
1 First find the connected database and open the mysql database
2 Find the user table modification permission
Change the host attribute where user is root, change localhost to % and save
3 Execute the refresh permission command
flush privileges;
4 tests
Retested again and found that the problem was solved.