Description:
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 127.0.0.2 before)
phys-webCv2-1:~# grep bind-addr /etc/my.cnf
bind-address=127.0.0.1
bind-address=127.0.0.2
phys-webCv2-1:~# grep port /etc/my.cnf
port=33307
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
O_RDWR
SOCK_STREAM
SO_REUSEADDR,SO_SNDBUF(49152),SO_RCVBUF(49152)
sockname: AF_INET 127.0.0.2 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]
/var/run/name_service_door
5: S_IFSOCK mode:0666 dev:276,0 ino:6646 uid:0 gid:0 size:0
O_RDWR
SOCK_STREAM
SO_REUSEADDR,SO_SNDBUF(16384),SO_RCVBUF(5120)
sockname: AF_UNIX /tmp/webC-mysqltest.sock
[...]
phys-webCv2-1:~# telnet 127.0.0.2 33307
Trying 127.0.0.2...
Connected to 127.0.0.2.
Escape character is '^]'.
A
4.1.14-standard-log[...]
phys-webCv2-1:~# telnet 127.0.0.1 33307
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
Description: 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 127.0.0.2 before) phys-webCv2-1:~# grep bind-addr /etc/my.cnf bind-address=127.0.0.1 bind-address=127.0.0.2 phys-webCv2-1:~# grep port /etc/my.cnf port=33307 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 O_RDWR SOCK_STREAM SO_REUSEADDR,SO_SNDBUF(49152),SO_RCVBUF(49152) sockname: AF_INET 127.0.0.2 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] /var/run/name_service_door 5: S_IFSOCK mode:0666 dev:276,0 ino:6646 uid:0 gid:0 size:0 O_RDWR SOCK_STREAM SO_REUSEADDR,SO_SNDBUF(16384),SO_RCVBUF(5120) sockname: AF_UNIX /tmp/webC-mysqltest.sock [...] phys-webCv2-1:~# telnet 127.0.0.2 33307 Trying 127.0.0.2... Connected to 127.0.0.2. Escape character is '^]'. A 4.1.14-standard-log[...] phys-webCv2-1:~# telnet 127.0.0.1 33307 Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused