mysql-replication-playground

Let Vagrant fire up a MySQL replication network for you to play with!

  • 所有者: cschmidt/mysql-replication-playground
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

MySQL Replication Playground

Welcome to the MySQL Replication Playground, a Vagrant-powered mini-project
that lets you run multiple VMs in various MySQL replication configurations.

This is just getting started (plus I'm new to Vagrant and Chef), so things are
not yet complete. Currently only a simple master-slave is supported, and you
still have to configure the slave manually (details below). The goal is to
eventually fully automate the configuration of various MySQL replication
scenarios, such as multi-master round robin in addition to the classic
master-slave setup.

Firing things up

You should have the following already installed:

  • git
  • rvm (with a Ruby 1.9.3)
  • VirtualBox

If you have rvm all set up, then just:

$ git clone git@github.com:cschmidt/mysql-replication-playground.git
$ cd mysql-replication-playground

If you accept the .rvmrc, that'll do a bundle install, after which you
can:

$ vagrant up

This will download the necessary base boxes, launch two VMs (db1 and db2), and
install MySQL. You can access each one with:

$ vagrant ssh db1
$ vagrant ssh db2

Configuring the slave (for now)

Until I get replication configuration fully automated, you'll have to manually
configure the slave:

  1. $ vagrant ssh db2

  2. Configure and start the slave:

    vagrant@db2:~$ mysql -u root
    db2 mysql> change master to
    master_host = '192.168.2.11',
    master_user = 'repl',
    master_password = 'repl_pw',
    master_port=3306;
    db2 mysql> start slave;
    

That wasn't so hard, now, was it?

Handy shell snippets

See if the slave is running:

mysql -u root -e 'show slave status\G', grep 'Slave_SQL_Running'

主要指標

概覽
名稱與所有者cschmidt/mysql-replication-playground
主編程語言Ruby
編程語言Ruby (語言數: 1)
平台
許可證
所有者活动
創建於2012-10-12 03:14:03
推送於2012-10-31 19:13:32
最后一次提交2012-10-31 12:13:28
發布數0
用户参与
星數4
關注者數1
派生數2
提交數19
已啟用問題?
問題數3
打開的問題數2
拉請求數0
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?