Error code: 2003 cannot connect to MySQL server in (10061)

Source: Internet
Author: User
Tags error code

A MySQL server was installed on Ubuntu today and an error occurred when connecting to the MySQL server with client software on Windows:

Error code:2003 cannot connect to MySQL server at (10061

Toss to toss to do not do well, firewall also closed, 3306 Port also added to the outbound rules, but is not even, later inadvertently saw a post, got a hint. Open to /etc/mysql/my.cnf see the following:

# # Instead of skip-networking The default is now-listen only on# localhost which are more compatible and are not less sec Ure.bind-address        = 127.0.0.1#

This means that the MySQL server is bound to the 127.0.0.1 port by default so that other remote clients do not have access, and we have bind-address = 127.0.0.1 commented out here, the result is as follows:

# # Instead of skip-networking The default is now-listen only on# localhost which are more compatible and are not less sec ure.# bind-address      = 127.0.0.1#

Then restart the MySQL service:

sudo restart MySQL

Successfully solved!

Error code: 2003 cannot connect to MySQL server in (10061)

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.