TechSpace Knowledgebase
Search:     Advanced search
Browse by category:
Contact Us

ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)

Views: 34
Votes: 0
Posted: 19 Dec, 2018
by: Liaw E.
Updated: 20 Dec, 2018
by: Liaw E.

How should I configure MYSQL bind-address field in my.cnf?

  • If MySQL binds to 127.0.0.1, then only software on the same computer will be able to connect (because 127.0.0.1 is always the local computer).
  • If MySQL binds to 192.168.0.2 (and the server computer's IP address is 192.168.0.2 and it's on a /24 subnet), then any computers on the same subnet (anything that starts with 192.168.0) will be able to connect.
  • If MySQL binds to 0.0.0.0, then any computer which is able to reach the server computer over the network will be able to connect.

These are all transport-level connections. Remote computers still need to qualify for application-level, which is to say they will still require the correct login credentials and host parameters from mysql.user.




RSS