Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Me and a friend are developing a range of programs which uses a basic currency called "points" each user can gain and spend points for free.

The problem we face is MySQL we can connect to the databases and execute query's etc however I recently purchased a new Data Server however we would like to use more than just one server for our project incase one should go down for any reason (DDoS/DoS, Maintenance).

We have done many searches and we have encountered "MySQL Replication" (we are still reading about this) however we would like to know if there was a program or something which would keep our servers in sync (a bit like DropBox) where if a user spends 20 points on a server and the other server is down a program would have a record of the 20 points and update the other server when its back online.

I would just like some ideas if you need anything clearing up let me know, personally I would like to use just my database but he seems insistent that we use his server but sometimes his internet can really drop.

share|improve this question

migrated from stackoverflow.com Mar 24 '13 at 11:46

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

    
If you're not keen to go down the replication route, you could have a updated_at column on all your tables, and have a script push (or pull) columns that have not been seen on the secondary database. –  halfer Mar 21 '13 at 16:02

2 Answers 2

This is a textbook use case for standard MySQL Replication.

You will need to decide if one DB will be the master and the other the slave in which case only the master replicates to the slave. If you want clients to be able to connect to either machine and issue writes and then have writes be propagated to both machines than you will need to look into Multi-Master replication:

http://mysql-mmm.org/

If you will be doing just standard master -> slave than MySQL has native tools as thats the default stack.

share|improve this answer

I think you've already answered your own question. You need to implement replication.

A quick search turned up this: http://dba.stackexchange.com/questions/8680/what-is-the-best-way-to-create-mysql-master-slave-replication-setup-and-troubles

And in general, a search for "mysql replication" on the DBA Stackexchange is another good place to explore. http://dba.stackexchange.com/questions/tagged/mysql+replication

share|improve this answer

Your Answer

 
discard

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