Originally Posted by GoodOmens
You could do a master/slave relationship. I know you can set it up in php to failover to the slave if no response comes from the main database.
Essentially the slave database pulls queries from the main database to get its updates. Not ideal but should work in your case.
An improvement to this would be to set them up in a "circular replication" config, wherein each is both a master and a slave to the other. There's some implementation issues to be aware of, but the howtos you'll find generally make that pretty clear.
Originally Posted by ajatiti
What about using MySQL cluster?
It doesn't require external storage but it requires one server each for MySQL node, Data node and management node.
Is it possible to have MySQL node, data node and management node on the same server with Linux? Then have backup server with MySQL, data node and management node on same server. So in this case we can have only two physical servers and no external storage.
It's probably possible, but it's definitely not a good idea. If you're talking about a setup with less than 4 hosts in it, then you should be able to come up with a replication architecture that accomplishes what you want without resorting to misusing the cluster engine, I'd expect.