mysql-slaver 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/mysql_slaver +0 -22
- data/lib/mysql_slaver.rb +1 -0
- metadata +3 -3
data/bin/mysql_slaver
CHANGED
@@ -2,26 +2,4 @@
|
|
2
2
|
|
3
3
|
require 'lib/mysql_slaver'
|
4
4
|
|
5
|
-
module MysqlSlaver
|
6
|
-
class CLI < ::Thor
|
7
|
-
option :master_host, :required => true, :desc => "The server which will be the replication master, for this slave"
|
8
|
-
option :database, :required => true, :desc => "The database to copy from the master"
|
9
|
-
option :replication_user, :required => true, :desc => "DB user (on the master host), with replication permissions"
|
10
|
-
option :replication_password, :required => true, :desc => "DB password for the replication user"
|
11
|
-
option :root_password, :desc => "Password for the mysql root user (on both master and slave)"
|
12
|
-
desc "enslave", "start mysql replication to this host from a master"
|
13
|
-
long_desc <<-LONGDESC
|
14
|
-
LONGDESC
|
15
|
-
def enslave
|
16
|
-
MysqlSlaver::Slaver.new(
|
17
|
-
:master_host => options[:master_host],
|
18
|
-
:mysql_root_password => options[:root_password],
|
19
|
-
:database => options[:database],
|
20
|
-
:replication_user => options[:replication_user],
|
21
|
-
:replication_password => options[:replication_password]
|
22
|
-
).enslave!
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
5
|
MysqlSlaver::CLI.start(ARGV)
|
data/lib/mysql_slaver.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysql-slaver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Salgado
|