I was wondering if there are any MySQL replication automators or managers that can take over the tasks of deploying MySQL slaves from a master.

I come from an old school server management background, so I'm familiar with setting up MySQL replication manually. Recently I began working with AWS and was very impressed with how simple RDS made setting up replication slaves.

What I'd like to know is, are there any solutions that can automate the spinning off of slaves from a running master ala Amazon RDS?

  • there are some interesting looking projects that are in the pipe-line red dwarf from rackspace is one. – Tom H May 24 '12 at 12:04

How about Tungsten Replicator?

| improve this answer | |

This command should get you 80% of the way there:

mysqldump $yourdb --master-data --single-transaction | mysql remotehost

As long as your master server has binlogs enabled and both servers have an id assigned in the config file, that should give you a pretty fast start to the day.

| improve this answer | |
  • 1
    +1 for --master-data and --single-transaction, however, this only applies to transactional engines and won't work for MyISAM – sreimer May 25 '12 at 15:45
  • thanks for the feedback! as mentioned by @sreimer this doesn't work with MyISAM. I'm working with a legacy db which has several gigs of data. Right now we use copy the data directory as a MySQL dump would take about an hour and we can't afford to lock for that long. – Kevin May 28 '12 at 3:47
  • @Kevin I'd suggest switching over to InnoDB, but if you're stuck on MyISAM for some reason then get a snapshot layer like LVM under your filesystem. Lock tables, take snapshot, note master data, unlock tables, then begin copying from the snapshot. – Jeff Ferland May 28 '12 at 14:43

Well @Kevin, if you’re looking for a tool then there’s Tungsten replicator as already mentioned before me, and I would also maybe check out DBreplicator (I know there are some other DB replication tools available as well but I haven’t had an “on-hands” experience).

Another option is to consider a hosted database solution with auto scaling; this will save you the need to deal with replication manually. I'm familiar with Xeround's http://xeround.com/”>cloud database which is also available on EC2, their solution manages the replication to additional slaves as the load on the database grows.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.