CCQL:
CCQL is a tool that allow user to connect multiple mysql server node Concurrently at the same time. It comes into picture when a user want to run a same operation on multiple server and it operational time.
How It works?
It connects to multiple MySQL servers at the same time with the given options & credentials or in other way user and password should be same to runs given query. This saves operational time and gives better productivity.
Download ccql binary from the following weblink:
https://github.com/github/ccql/releases
Below is the Quick option which can be used while doing using CCQL
- If a DBA want to check the version of all the servers whether they are exactly same or not.
1 ccql -C /anylocaltion/.mypass.cnf -h "host001,host003,host005" -q "SELECT VERSION();"
the above command
-C : we need to pass the credential file which contains login id password of the user which is common among all node
1 2 3 4 5 |
[client] user="userName" password="password" |
-h : You can either pass the hostname or pass the hostname file which It contains the list of host name that you want to connect.
-q : the Query which you are going to pass to the servers.
2. Even one can use Bash/shell script predefined function with that command to filter the output
e.g
1 |
ccql -C /anylocaltion/.mypass.cnf -h hostname.txt -q "SELECT SLAVE STATUS" | awk ' { print $1 } ' |
The given above are the basic example for the understanding there are lot of things a DBA can do using this tool and save operational time.
More details are available on the given below Link.
https://github.com/github/ccql