mysql-connectivity

command module
v0.0.0-...-42664a1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

MySQL Connectivity Check Utility

GoDoc Go Report Card GitHub go.mod Go version

Docker Stars Docker Pulls

Use Case

To evaluate downtime during MySQL cluster maintenance, we can use this simple utility to measure the downtime

Usage

Check MySQL connectivity with command "SELECT 1"

./mysql-connectivity \
    --user tester \
    --pass mySecr3tP@ssword \
    --addr mysql.example.dev \
    --dbname testdb \
    --command "SELECT 1"

Sample Output:

INFO[2021-03-13T23:55:45+08:00] Opening database connection
INFO[2021-03-13T23:55:45+08:00] Ping pass
DEBU[2021-03-13T23:55:46+08:00] 1
DEBU[2021-03-13T23:55:47+08:00] 1
DEBU[2021-03-13T23:55:48+08:00] 1
DEBU[2021-03-13T23:55:49+08:00] 1
DEBU[2021-03-13T23:55:50+08:00] 1
DEBU[2021-03-13T23:55:51+08:00] 1

How to get developer build?

$ go get -u github.com/guessi/mysql-connectivity
$ go install github.com/guessi/mysql-connectivity

License

Apache-2.0

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