Bug #20647 Mysql which is originally bound to IP, shift to IP1 without restarting
Submitted: 23 Jun 2006 5:39 Modified: 23 Jun 2006 7:37
Reporter: Renuka R Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.15 OS:Solaris (Solaris 8)
Assigned to: CPU Architecture:Any

[23 Jun 2006 5:39] Renuka R
Consider a system with master node of mySQL (node 1 - IP1) and another node with slave mySQL (node 2 and IP2). There is also a 3rd system with slave (node3 and IP3). Both the node 2 and node 3 have slave copies and connected to same master - node 1. 
The system is so confgured that the node3 would always be the slave node and node 1 and node2 can interchange the roles of master and standby. For this the requirement is that the node3 should be trasparent of the change in master node. So the solution we thought is to have the master always binding on floating IP (IP4). This IP is either attached to node 1 or node 2 depending on which is the master node.
So the node 3 always interfaces with IP4 irrespective of whether node1 is master or node 2is master.
Now for this solution, we require that the node 1 first binds on IP4 (rather than IP1) so that node3 is able to connect to this. Since the IP4 is attached to node1, node 2 mySQL needs to attach to IP2 to interface with node1 (with destination IP as IP4).
As soon as node1 goes down, node 2 takes over the master role. It also attaches and activates IP4 on this system. Since we would like node3 to be transparent of this change, we would like node 2 mySQL to bind to IP4 now (earlier it was bound to IP2). 
We would like to get a solution for the above so that node 2 which is originally bound to IP2, should shift to IP4 without restarting the mySQL daemon.

For this we were looking for any one of the following options through mySQL.
a) At runtime change the IP address in my.cfg file and trigger through some API (we wanted to know which could be appropritate API for the same) trigger mySQL to re-bind to the new IP address without restarting the database (in-memory data base is being used).
b) At init time itself, request mySQL to bind to both the IP1/IP2 and IP4. (Note that there are other IPs also on system, which we donot want mySQL to use).
Please let us know a solution for the above.


How to repeat:
Please let us know a solution for the above.
[23 Jun 2006 7:37] Valeriy Kravchuk
We're sorry, but the bug system is not the appropriate forum for 
asking help on using MySQL products. Your problem is not the result 
of a bug.

Support on using our products is available both free in our forums
at http://forums.mysql.com and for a reasonable fee direct from our
skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.

Additional info:

I see a popular and known feature request here (to bind MySQL to some of several IP addresses). All other things should be discussed on forums or in frames of commercial support agreement.