It allows remote hosts to access the database

1 Introduction when br /> mysql just installed, the user table in view of the time. You can see several hosts and users. When we connect coming in, root @ localhost is used. But if the other Host and user login is no way to successfully landing.
It allows remote hosts to access the database
2, add new users and give permission to
present this mysql8.0 version can not be used as a direct grant command to add users, whether by error.
It allows remote hosts to access the database

I do not know what needs to be set, or I knock this command in question, also invited experts point out, thank you.

(1) You can use the following command to create the user
CREATE USER 'root'@'192.168.204.1' IDENTIFIED BY ' 123456';
name of the user here can easily play
back the IP, can be a%, representing all the IP addresses.
IP can also write separately, you are your own IP address
if you are a virtual machine, usually xxx1 the IP.

(2) then give permission
Grant All privileges ON . To 'root'@'192.168.204.1';
I'm here all the permissions granted to the user @ host.

(3) then refresh
flush privileges;
It allows remote hosts to access the database

Source
operation and maintenance Guild: Allows remote hosts to access the database

Guess you like

Origin blog.51cto.com/4856198/2441747