[OpenSIPS-Users] Help!! How to do failover of mysql connection

Adrian Georgescu ag at ag-projects.com
Wed Nov 26 22:55:20 CET 2008


Try use this settings:

On master

auto_increment_increment = 2
auto_increment_offset	 = 0

On slave

auto_increment_increment = 2
auto_increment_offset	 = 1

This makes sure that auto-increments do not colide between master and  
slave so you can achieve switchover without conflicts because of auto  
increment columns.

Adrian


On Nov 26, 2008, at 10:18 PM, Brett Nemeroff wrote:

> Before doing this, I'd seriously consider the problems associated  
> with master-master replication.
>
> um, I don't know what they are.. but I know they are real problems.  
> Such as collisions in auto-incrementing data.
> -Brett
>
>
> On Wed, Nov 26, 2008 at 3:06 PM, Uwe Kastens <kiste at kiste.org> wrote:
> Hi Krunal,
>
> >
> >     I am just on my way to implement the same. At the moment I am  
> planing a
> >     kind of Mysql Master - Master together with one VIP for
> >     Mysql-opensips-communication. So for your example you will  
> have to
> >     mysql-servers. opensips is connection to lets say to 192.168.1.4
> >     <http://192.168.1.4/> which
> >     points on one of your mysql-servers. You will need active- 
> active for
> >     mysql since opensips will write some information in the  
> database as
> >     well.
> >
> >
> >
> >      I am working with mysql-5 and heartbeat-2 in mode 1. Its nearly
> >     working.
> >
> >
> > Would you please explain it somewhat in detail?
>
> Sure, at the moment its only a testing platform. I took two
> MySQL-Servers which are configured as master-master. So writing on  
> both
> databases is possible and is synchronized. I found a good step-by-step
> guide under:
>
> http://www.howtoforge.com/mysql_master_master_replication
>
> I configured a very simple setup for heartbeat to share one VIP  
> between
> both servers for client connection. So a kind of mysql-test is  
> needed to
> check if the database is online on the "normal" IP-Adress. If not the
> VIP should be switched to the other server. I found a kind of
> nagios_mysql_check usefull.
>
> The openser-servers are connecting only to the vip address. Read and
> Write are working on only one database. This should be enough for a
> small environment.
>
> Why no master - slave? I found it to complicate to make a slave to a
> master by skript.
>
> Why not the "normal" setup (drbd with mysql and heartbeat)? I looks to
> complicated.
>
> But! I have no idea how it will work in a real world.
>
> BR
>
> kiste
> --
>
> kiste lat: 54.322684, lon: 10.13586
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081126/f336952b/attachment.htm 


More information about the Users mailing list