MySQL can connect with localhost, but cannot use IP connection problem

Source: Internet
Author: User

Ubuntu installed MySQL, through localhost, 127.0.0.1 can be connected, but the use of IP is not connected

Possible causes:

1. View/ETC/MYSQL/MY.CNF

cat/etc/mysql/my.cnf | grep 127
Can see
Bind-address  = 127.0.0.1
MySQL only listens to 127.0.0.1 by default, and it fails with the assigned IP connection.

Comment out the line

# bind-address   = 127.0.0.1
and close MySQL
Service MySQL Stop
Start again
Service MySQL Start
If it is not connected, it may also be a problem with user rights, each user has a login IP

For more details, see http://my.oschina.net/lhplj/blog/273394.










MySQL can connect with localhost, but cannot use IP connection problem

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.