The following article describes how to connect the MySQL client to a remote database server. In general, we are used to installing MySQL databases on a personal computer, then I used SQLyog and other client software to connect. Today I tried to connect to a remote MySQL database server.
The result is displayed in English, meaning that the client is not licensed and cannot access the database. I searched for it 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 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('192.168.88.234','%','xuys','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
- update db set host = '%' where user = 'xuys';
Repeat steps 2nd and 3 above.
The above content is an introduction to the remote database server connecting to the MySQL client software. I hope you will get some benefits.
The above content describes how to connect the MySQL client to a remote database server. I hope it will help you in this regard.