MySQL Remote connection

Source: Internet
Author: User

The MySQL remote connection has 3 steps:

1. Grant permissions to the host for remote access:

1 GRANT all privileges the yourdatabasename.* to [email protected]'romote access IP' c6> 'password' with GRANT OPTION;

In order for our changes to take effect, we then enter the command:

Flush privileges;

2. Modify the MySQL my.cnf file on the original installation machine, the location of the file is in

/etc/mysql/

Path, modify the contents as follows:

Bind-address            = Your own IP

Then, restart the MySQL service:

sudo /etc/init.d/mysql start

The results are as follows:

3. Remote Login

1 3306 -D DATABASENAME

Results of successful operation:

Note: Here the username, password is the 1th step in the authorization of the user name, user password;

IP is also the IP of the Telnet machine, and also the IP of the MySQL installed machine;

P must be capitalized, the following 3306 is the default port number of MySQL, according to their own circumstances appropriate fill;

D in-D must also be capitalized, followed by the name of the database authorized in the 1th step.

===================================================================

Some time back to the error:

Sudo/etc/init.d/mysql start

can be solved.

MySQL Remote connection

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.