MySQL Connectivity Check Utility
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