GithubHelp home page GithubHelp logo

mysqldiff's Introduction

mysqldiff

Wrap the sys-mysql-diff script to monitor MySQL changes with batch methods.

Dependency

sys-mysql-diff

How to build

go get github.com/chenzhe07/mysqldiff.git
go build -o mysqldiff *.go

How to use

privileges

all instances changes can be store in [backend] section, [test3301] and [test3306] can be monitor by sys-mysql-diff, any instance that monitored should be with the testxxxx format.

user_mysqlmon user should have the following privileges:

grant select,insert,update on mysqldiff.* to user_mysqlmon@`10.0.21.%`;

user_mysqldiff user with the following privileges:

grant select on *.* to user_mysqldiff@`10.0.21.%` with grant option;

conf file

sys-mysql-diff monitor all instance when db option is information_schema.

[backend]
dsn = user_mysqlmon:xxxxxxxx@tcp(10.0.21.17:3306)/mysqldiff?charset=utf8

[test3301]
host = 10.0.21.5
port = 3301
db   = test
user = user_mysqldiff
pass = xxxxxxxx
tag  = host_location

[test3306]
host = 10.0.21.7
port = 3306
db   = percona
user = user_mysqldiff
pass = xxxxxxxx
tag  = host_location

monitor with mysqldiff

# ./mysqldiff -conf conf.cnf -verbose
2017/03/15 16:31:27 ---------------------------
changes from 10.0.21.5:3301 
changes from 10.0.21.7:3306 
DROP TABLE `emp`;
SET GLOBAL wait_timeout = 1000;
2017/03/15 16:31:27 insert 10.0.21.17:3306/percona ok
2017/03/15 16:31:27 ---------------------------

License

MIT / BSD

mysqldiff's People

Contributors

arstercz avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.