Bug #20571 Allow MySQL to bind only to selected interfaces
Submitted: 20 Jun 2006 11:30 Modified: 21 Jun 2006 11:42
Reporter: Renuka R Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S4 (Feature request)
Version:4.1.15 OS:Solaris (Solaris)
Assigned to: CPU Architecture:Any

[20 Jun 2006 11:30] Renuka R
Description:
1> mysql is not able to connect to multiple interfaces.
In HA its required a single mysql daemon to be connected to 2 IP address.

by specifying in bind address in my.cnf it connects to the IP address specified else connects to all the IP address assigned to that machine.

 

How to repeat:
1>Assume machine A with IP(127.0.0.1) and machine B with IP(127.0.0.2) are in HA setup.
For m/c A to act as master floating IP addredd 127.0.0.3 is attached.

2> On starting machine A with bind address 127.0.0.1 and FIP activated on it 127.0.0.3.
Machine B 127.0.0.2 as standby with bind address 127.0.0.3.

3>When machine B tries to connect to machine A its not possible as bind address is 127.0.0.1.

Thus HA goes unsupported.

As a work around if both machine A and B are started with no bind address specified , mysql binds to all IP address attached to that machine and blocks the Port on all those IP address which is redundant.

Suggested fix:
At runtime it should be possible to trigger mysql to connect to the new IP address for which it needs to be connected.
[21 Jun 2006 7:51] Sveta Smirnova
Your report looks like feature request for binding MySQL server to more than one address. But it is possible to only bind to one address. As system has own tools to solve you problem, I think it is not usefull feature request.
[21 Jun 2006 8:23] Renuka R
Hi,

   So it means in mysql its not supported to connect to more than one IP address.
But I am not clear in your reply
"As system has own tools to solve you problem".
Does that mean there's a means to override mysql bind.
If its so please suggest me that.

All in all I request you to share if there is an alternative where even though mysql binds to all interface the unwanted instances can be released externally.

Regards,
Renuka
[21 Jun 2006 11:29] Sveta Smirnova
OK. I'll save this bug as feature request with addition what will be an external listener instead of bind addresses. Thank you.
[21 Jun 2006 11:42] Renuka R
Hi,

   Sorry, i think you misinterpreted me.
I wanted to know that at present even though mysql binds to all the interfaces on the machine, is it possible to override that behaviour with some mechanism or is that this can not be changed at any cost.

I mean is there a solution where mysql an can connect only to those interfaces which are intended.

Regards,
Renuka
[16 Sep 2006 6:20] Valeriy Kravchuk
MySQL server (mysqld process) can either be bound to all IP-addresses on the machine, or to the pspecific one (with --bind-address option). So, it can be bound to single "aliased" IP in HA solution, like HACMP provided by IBM/AIX.