mysqlaudit 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +12 -2
- data/bin/mysqlaudit +7 -4
- data/lib/mysqlaudit/version.rb +1 -1
- metadata +7 -5
- checksums.yaml +0 -15
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Mysqlaudit
|
2
2
|
|
3
|
-
MySQL tool build in ruby for audit all tables with triggers, this
|
4
|
-
log for SQL transactions executed sentences as INSERT, UPDATE, and
|
3
|
+
MySQL Administration tool build in ruby for audit all tables with triggers, this
|
4
|
+
is a change log for SQL transactions executed sentences as INSERT, UPDATE, and
|
5
|
+
DELETE.
|
5
6
|
|
6
7
|
## Useful for:
|
7
8
|
|
@@ -61,6 +62,8 @@ To apply rollback with specific transaction, this generate SQL output:
|
|
61
62
|
|
62
63
|
### Get deleted data:
|
63
64
|
|
65
|
+
You delete data, could reverse with simple insert statements.
|
66
|
+
|
64
67
|
```Shell
|
65
68
|
$ mysqlaudit rollback --host 127.0.0.1 \
|
66
69
|
--user root \
|
@@ -77,6 +80,10 @@ Output of last executed command:
|
|
77
80
|
```
|
78
81
|
|
79
82
|
### Get updated data:
|
83
|
+
|
84
|
+
You updated data, could reverse with simple update statements to change new for
|
85
|
+
old value.
|
86
|
+
|
80
87
|
```Shell
|
81
88
|
$ mysqlaudit rollback --host 127.0.0.1 \
|
82
89
|
--user root \
|
@@ -94,6 +101,9 @@ Output of last executed command:
|
|
94
101
|
```
|
95
102
|
|
96
103
|
### Get inserted data:
|
104
|
+
|
105
|
+
You inserted data, could reverse with simple delete statements.
|
106
|
+
|
97
107
|
```Shell
|
98
108
|
$ mysqlaudit rollback --host 127.0.0.1 \
|
99
109
|
--user root \
|
data/bin/mysqlaudit
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
# Only for deploy this script.
|
4
4
|
$LOAD_PATH << './lib'
|
5
5
|
|
6
|
-
|
7
6
|
require 'rubygems'
|
8
7
|
require 'commander'
|
9
8
|
require 'commander/import'
|
@@ -45,14 +44,18 @@ end
|
|
45
44
|
|
46
45
|
command :rollback do |c|
|
47
46
|
c.description = 'Rollback transaction cath in audit table'
|
48
|
-
c.syntax = 'audits rollback --host 127.0.0.1 --user root [--pass admin] --schema sakila --table foo --statement
|
47
|
+
c.syntax = 'audits rollback --host 127.0.0.1 --user root [--pass admin] --schema sakila --table foo --statement insert'
|
49
48
|
c.option '--host STRING', String, 'Host'
|
50
49
|
c.option '--user STRING', String, 'User'
|
51
50
|
c.option '--pass STRING', String, 'Password'
|
52
51
|
c.option '--schema STRING', String, 'Schema name'
|
53
52
|
c.option '--table STRING', String, 'Table name'
|
54
|
-
c.option '--statement STRING', String, 'Statement operation
|
53
|
+
c.option '--statement STRING', String, 'Statement operation: insert, update, delete'
|
55
54
|
c.action do |args, options|
|
56
|
-
|
55
|
+
if [:insert, :update, :delete].include? options.statement.to_sym
|
56
|
+
Mysqlaudit::Actions.new(options.host, options.user, options.pass, options.schema, options.table, nil, options.statement).rollback
|
57
|
+
else
|
58
|
+
puts "Invalid values on argument: --statement."
|
59
|
+
end
|
57
60
|
end
|
58
61
|
end
|
data/lib/mysqlaudit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysqlaudit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Nicola Strappazzon C.
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-18 00:00:00.000000000 Z
|
12
13
|
dependencies: []
|
13
14
|
description: MySQL tool for audit all tables with triggers.
|
14
15
|
email: nicola51980@gmail.com
|
@@ -27,25 +28,26 @@ files:
|
|
27
28
|
homepage: https://github.com/nicola51980/mysqlaudit
|
28
29
|
licenses:
|
29
30
|
- MIT
|
30
|
-
metadata: {}
|
31
31
|
post_install_message:
|
32
32
|
rdoc_options: []
|
33
33
|
require_paths:
|
34
34
|
- lib
|
35
35
|
required_ruby_version: !ruby/object:Gem::Requirement
|
36
|
+
none: false
|
36
37
|
requirements:
|
37
38
|
- - ! '>='
|
38
39
|
- !ruby/object:Gem::Version
|
39
40
|
version: '0'
|
40
41
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
41
43
|
requirements:
|
42
44
|
- - ! '>='
|
43
45
|
- !ruby/object:Gem::Version
|
44
46
|
version: '0'
|
45
47
|
requirements: []
|
46
48
|
rubyforge_project:
|
47
|
-
rubygems_version:
|
49
|
+
rubygems_version: 1.8.25
|
48
50
|
signing_key:
|
49
|
-
specification_version:
|
51
|
+
specification_version: 3
|
50
52
|
summary: MySQL Audit Tool
|
51
53
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
MjRmYmMyZjFiYjNiMGNkYzllNTY3NjZjMWJlZTljNjY0MTUwOTE1Zg==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
N2MwYTg0NWFlZjQ5NzAyMTQzYWRmYzc0YWEwMDk4NGRmY2ViN2ZjNw==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ODUzYWIxYWYxY2NhMTI2MTlmZTM0NzhmN2MyYTEyYWY0MjlhMzEwMGUxNWZh
|
10
|
-
MjVhMmI3ZDQ1YWVlZTE0YjRjM2E3MTJlZGQxMGFiYjA2YjA4NWQ1NWQyOWIz
|
11
|
-
NzQ1MDVmYmM5NWYzNWFkYzEzYWI0YTA1ZjQ5NjhlMDMxYTliNzU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MjI4ODI0MWQwODYyNWViZjdiMjFiYWIwZmM0ZmUyOWY2NzVkN2RkYjMyNzYx
|
14
|
-
OWZkNTc5NzNiZGFkYWNlYjNkMGJhMjlhMzgwYWFlZTk5NjRjYjI4Nzg5MWU5
|
15
|
-
NGY2N2EyYjc0ZTBkNDFlOWEzZWZkZTBkY2M2YzlhMDJiMWY0MzQ=
|