Mirroring MySQL Databases

Soldato
Joined
30 Apr 2007
Posts
3,095
Location
Kent
At work we've got our tills running through OpenbravoPOS. Something which occurred to me, whilst rebooting our box today for an update (due to lack of thought on mine and my colleague's part) we didn't have till access for around five minutes whilst this update took place. Is there easy way to mirror a MySQL database between two servers?

Obviously I'm thinking of doing this primarily for a backup as we have a single copy of this database. But for redundancy if the box ever has issues we can just point Openbravo to the other boxes' IP Address.

Suggestions?

Many thanks in advance.
 
Not really my thing, but i was fairly sure replication was a pretty central part of a database's function this might help!

I'm sure someone here will be a bit more helpful! Also some apps, won't like simply being pointed at another server.
 
Not really my thing, but i was fairly sure replication was a pretty central part of a database's function this might help!

I'm sure someone here will be a bit more helpful! Also some apps, won't like simply being pointed at another server.

Thanks. Providing the database is intact on another server, Openbravo can simply 'latch on' to it and continue operation.
 
You can have master master replication or master slave. One of the problems i've seen with master master is that you will need a cluster aware application if you are writing to mysql. Primary keys etc can get confusing when using master master.
 
That's interesting. I'm guessing you'd typically advise a Master-Slave configuration?

I used a statement based master slave config which worked well over a T1 line. Locally it was very fast. The slave db is only really good as a read only though, if you start writing to it any changes will be wipes by the master server. Also, it will replicate any changes made to the master, i.e if you accidentally drop a db you're toast.

I looked at a master master setup but our web app was not designed with that in mind. There could be other ways to get around this.

I have a decent link at home with a guide for master slave replication over ssl. I'll post it later.
 
Back
Top Bottom