mysqlfindmaster

command module
v0.0.0-...-8fa38e5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2020 License: MIT Imports: 10 Imported by: 0

README

mysqlFindMaster

  • A tool to find a master from a specified instance
  • Supported Multi Source Replication
  • Supported a circular replication of 2 instances
  • Not supported a circular replication over 3 instances. Will be error

Install

go get -u github.com/kenken0807/mysqlFindMaster

Use

Example

Master:10.0.0.3 -> Intermediate Slave: 10.0.0.2 -> Slave:10.0.0.1
#./mysqlFindMaster -h 10.0.0.1 -P 3306 -u UserName -p Password
{"MasterHost":"10.0.0.3","MasterPort":"3306"}

debug mode

#./mysqlFindMaster -h 10.0.0.1 -P 3306 -u UserName -p Password -d
Check  Host: 10.0.0.1 Port 3306
Result Host: 10.0.0.1 Port 3306 MasterHost: 10.0.0.2 MasterPort: 3306
Check  Host: 10.0.0.2 Port 3306
Result Host: 10.0.0.2 Port 3306 MasterHost: 10.0.0.3 MasterPort: 3306
Check  Host: 10.0.0.3 Port 3306
IsMaster  Host: 10.0.0.3 Port 3306
{"MasterHost":"10.0.0.3","MasterPort":"3306"}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL