Bug #14979 request for more than just one bind-address
Submitted: 16 Nov 2005 12:40 Modified: 15 Apr 2006 1:49
Reporter: Nils Goroll Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: C API (client library) Severity:S4 (Feature request)
Version:4.1, 5.0 OS:Any (*)
Assigned to: CPU Architecture:Any
Triage: Triaged: D5 (Feature request)

[16 Nov 2005 12:40] Nils Goroll
Currently, mysql seems to support only exactly one IP address to bind to
(besides bindung to IN_ADDR_ANY = all addresses).

This is a disadvantage in HA Cluster configurations, where a cluster
framework stops/starts stand-alone mysql instances (non-NDB) on
physical servers within a cluster.

Within such frameworks, you don't want to bind to IN_ADDR_ANY
but rather to specific IP adresses (Sun speak: locical hostname addresses)
in order to allow the cluster framework to switch two instances of
an application onto the same cluster node (with the same (standard)
port number).

This is currently possible with mysql, but only for exacly one IP address
per mysql instance.

In situations where you need more than one IP address for an HA
instance, you either have to bind to IN_ADDR_ANY and somehow
make sure that no two mysql instances will run on any cluster node
at the same time, or find other means by which to provide the second
address (tcp forwarder, NAT on a firewall - whatever).

Both solutions are not ideal, so this feature request is for a configuration
option allowing more than one IP address to be specified.

How to repeat:
try to bind to more than one address:

(yes, i did ifconfig lo0 addif before)

phys-webCv2-1:~# grep bind-addr /etc/my.cnf
phys-webCv2-1:~# grep port /etc/my.cnf

phys-webCv2-1:~# pfiles $(pgrep mysqld)
2171:   /local/rg-mysqltest/mysql/mysql-standard-4.1.14-pc-solaris2.10-x86_64/
  Current rlimit: 40970 file descriptors
   3: S_IFSOCK mode:0666 dev:276,0 ino:18926 uid:0 gid:0 size:0
        sockname: AF_INET  port: 33307
   4: S_IFDOOR mode:0444 dev:279,0 ino:63 uid:0 gid:0 size:0
      O_RDONLY|O_LARGEFILE FD_CLOEXEC  door to nscd[144]
   5: S_IFSOCK mode:0666 dev:276,0 ino:6646 uid:0 gid:0 size:0
        sockname: AF_UNIX /tmp/webC-mysqltest.sock
phys-webCv2-1:~# telnet 33307
Connected to
Escape character is '^]'.

phys-webCv2-1:~# telnet 33307
telnet: Unable to connect to remote host: Connection refused
[11 Oct 2006 13:10] Valeriy Kravchuk
Bug #23149 was marked as a duplicate of this one.
[25 Nov 2008 10:57] Axel Schwenke
Preferrably this should be a dynamic variable to allow changing bindings while the MySQL server is online.
[10 Jan 2014 10:13] Florian Roscher
This seems to be true for newer versions, too. At least if binding i.e. to two distinct IPv4 addresses is wanted.

If I read http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_bind-address corrently, up to 5.6 at least.

It looks like I cannot update the field 'Version', so I leave this as a comment.