Categorygithub.com/guessi/mysql-connectivity
modulepackage
0.0.0-20240802162047-fc942ac10773
Repository: https://github.com/guessi/mysql-connectivity.git
Documentation: pkg.go.dev

# 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