Demo of connecting MySQL client software to remote database server

Source: Internet
Author: User

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 ";

 
 
  1. grant select,update,insert,delete on *.* to kay@192.168.1.8 identified by "kaypass"; 

3. view the result and execute:

 
 
  1. use MySQL;  
  2. 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.

 
 
  1. 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:

 
 
  1. use MySQL;  
  2. insert into db values('192.168.88.234','%','xuys','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');  
  3. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.