Host '[ip address]' is not allowed to connect to this MySQL server database failures remote access solutions

1, open MySQL server
2, enter the system library: use MySQL;
. 3, view the user table: select * from user \ G; (\ G represents a column view, too long a lateral view folded)
Here Insert Picture Description
Here Insert Picture Description
Host indicating that the user is only localhost Log on locally
4. create a user may be remote login:

grant all privileges on *.* to root@'%' identified by '123456'

grant: to give permission
. : All rights
root: username
'%' means all IP can log
123456: password
Here Insert Picture Description
5, test Login
Here Insert Picture Description

Published 42 original articles · won praise 16 · views 3389

Guess you like

Origin blog.csdn.net/qq_41542638/article/details/104280925