Bind address and MySQL server [closed]

I came across the bind address while trying to configure the MySQL server. The details of why I want to configure the bind address is in the link below.

Multiple hostnames and multiple privileges?

Now, I want to understand the purpose of the bind address. In the sense, is a binding address the address we assign to the machine that is hosting the MySQL server? 

I have no clue. Would be really helpful if someone could explain me the purpose of it. Also, will assigning 0.0.0.0 to the binding address create any security flaws/loop holes?


The address you specify in bind tells MySQL where to listen. 0.0.0.0 is a special address, which means "bind to every available network".

Only client software which is able to open a connection to the server using the same address that is specified in the 'bind' option will be allowed to connect.

Some examples:

  • 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.