We are all used to installing MySQL on our own machine, and then using sqlyog and other client software to connect. Today we tried to connect to a remote MySQL database server. The result is a string of English letters, it seems that the client is not licensed and cannot access the database. I searched on Google and used this method to solve the problem:
1. Go to MySQL and create a new user KAY:
2. Format: grant permission on database name. Table name user @ login host identified by "User Password ";
Grant select, update, insert, delete on *. * To kay@192.168.1.8 identified by "kaypass ";
3. view the result and execute:
Use MySQL;
Select host, user, password from user;
We can see that the Kay user just created already exists in the User table. The Host field indicates the host to log on to. The value can be an IP address or a host name,
Changing the value of the Host field to % indicates that you can log on to the MySQL server as a Kay user on any client machine. We recommend that you set the value to % during development.
Update user set host = '%' where user = 'Kay ';
Another method is as follows: (I have not tried it for your reference only ):
A../mysqladmin-uroot-p21century reload
./Mysqladmin-uroot-p21century Shutdown
B../mysqld_safe -- User-root &
Remember: Any modification to the authorization table must be reload again, that is, step 1.
If you still cannot connect from the client after the above three steps, perform the following operations to insert a record in the DB table of the MySQL database:
Use MySQL;
Insert into DB values ('2017. 168.88.234 ',' % ', 'xuys', 'y ', 'y', 'y ');
Update dB set host = '%' where user = 'xuys ';
Repeat steps 2nd and 3 above.