Remote connection to MySQL server

Source: Internet
Author: User

1. Command line: c:/>mysql-h 192.168.0.53-p 3306-u vicky-padmin

The local computer is the Win7 system, the remote computer room Linux system.

192.168.0.53 is the IP of my remote Linux system, "Mysql>" will appear after successful connection


Problems that arise with the solution set SAC:

1.Can ' t connect to MYSQL server on ' 192.168.0.53 ';

Possible causes:

The 1.MYSQL service is not started.

turn on the remote computer's MySQL service.

2.3306 Port only for local, not remote, we can check the situation of Port 3306.

Netstat-anp|grep 3306, you can see that 3306 ports are open only to local.

Normally, the 3306 port that MySQL occupies is only listening on IP 127.0.0.1, denying access to other IPs (Netstat can be viewed. (Canceling the local listener requires modifying the my.cnf file:):
sudo vi/etc/mysql/my.cnf
Bind-address = 127.0.0.1//Find this content and comment

2. Acess denied for user ' root ' @ ' 192.168.0.70 ' (using Password:yes).


Possible reasons: Root account permissions are not enough, may only be used locally, cannot telnet.

The query looks at the accounts and account scopes that exist in the database, and root is only valid locally.


We can create an account that can remotely log in to MySQL with other IP addresses, where I simply set up an account that can connect to the MySQL server from any host.

GRANT all privileges on * * to ' vicky ' @ '% ' identified by ' admin ' with GRANT OPTION






Remote connection to MySQL server

Related Article

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.