3

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?

Kevin
  • 31
  • 2
  • there are some interesting looking projects that are in the pipe-line [red dwarf](http://www.openstack.org/blog/2011/04/announcing-project-reddwarf-database-as-a-service/) from rackspace is one. – Tom May 24 '12 at 12:04

3 Answers3

3

How about Tungsten Replicator?

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
2

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.

Jeff Ferland
  • 20,547
  • 2
  • 62
  • 85
  • 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 03: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
0

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.

Lena Weber
  • 313
  • 1
  • 4