By default, remote control is not enabled for MySQL. Users with remote access must be added. if the version is installed, log on to the console provided by MySQL.
Log On with the root user, and then:
Grant all privileges on *. * to create the username @ "%" identified by "password ";
Flush privileges; * refresh the content just now *
Format: grant permission on database name. Table name to user @ login host identified by "User Password ";
@ The IP address (or host name) % of the client accessing mysql represents any client. If localhost is set to local access (then this user cannot remotely access the mysql database ).
You can also set the remote access permission for existing users. As follows:
Use mysql;
Update db set host = '%' where user = 'username'; (if the name is host = localhost, this user does not have the remote access permission)
Flush privileges;
View the result and execute:
Use mysql;
Select host, user, password from user;
+ -------------- + -------- + --------------- +
| Host | User | Password |
+ -------------- + -------- + ----------------- +
| Localhost | U 8RZq
| % | John | 123456 |
| Localhost | root |
+ -------------- + ------ -- + --------------- +