Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Currently, I've 2 DB servers say, public 123.123.123.123 IP mapped to one of the servers 192.168.1.2 and 192.168.1.3

Anyone has an idea how to set up auto sync of both MySQL server. And 192.168.1.2 is down, it will fallback to 192.168.1.3 with 123.123.123.123 mapped to it automatically without the need of manual configuration ?

Anyone has useful information to go towards this direction?

share|improve this question

migrated from stackoverflow.com Oct 17 '11 at 8:50

This question came from our site for professional and enthusiast programmers.

    
First google result for "mysql load balancing": howtoforge.com/loadbalanced_mysql_cluster_debian –  bdares Oct 17 '11 at 3:13
    
Offtopic - not a programming question. Should be on serverfault. –  Marc B Oct 17 '11 at 3:17

1 Answer 1

on my case i use haproxy (for lb, 1 active, 1 standby/backup mode) and keepalived (for ip failover). on norman condition, only 1 server active, 2nd server will standby. the synchronization between server1 and server2 using mysql master-master (circular replication).

 192.168.1.2 \
               - 192.168.1.1 (VIP) -- 123.123.123.123 - internet
 192.168.1.3 /

ref: - http://www.alexwilliams.ca/blog/2009/08/10/using-haproxy-for-mysql-failover-and-redundancy/ - http://www.neocodesoftware.com/replication/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.