Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 253
  • Last Modified:

I use linux and my sql for database sever

  how can i set up second server that can work when the first server is down what is the hardware and software that I need
0
teera
Asked:
teera
1 Solution
 
Alf666Commented:
Tough question :-)

You have to be very precise about what you are trying to do.

There are two questions :

1) Data replication
2) Switching mechanism (when your first server goes down).


1) Data replication

If your server is mainly for reading data (not too many writes), then it's very simple. Set the first server as a master, and the second one as a slave. This way, the second one will be an almost perfect replica of the first one. I say almost perfect, because you don't control exactly what happens at the precise moment of failure.

The problems you'll have to think about is what you do when you bring back the main server on. It won't be synced. In this case, I recommend a manual intervention that will change your slave server to become the master, and the old master to become a slave.

For more information :

http://www.mysql.com/doc/en/Replication_Features.html


2) Switching mechanism

That's the tough part. You can do manual switching (by, for example, switching IP addresses), or use clustering or high availability software.

One project (among others) is MySQL High Availability cluster :

http://mysql-ha.sourceforge.net/

There is also the well known Linux-HA project :

http://linux-ha.org/
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now