Page last updated:
This topic discusses how to use the
mysql-diag tool in Ops Manager.
mysql-diag prints the state of your MySQL highly available (HA) cluster and
suggests solutions if your node fails. VMware recommends running this tool against
your HA cluster before all deployments.
mysql-diag checks the following information about the status of your HA cluster:
- Membership status of all nodes
- Size as it appears to all nodes
- If it needs to be bootstrapped
- If replication is working
- Used disk space and inodes per server
To use the BOSH CLI to run
mysql-diag, do the following:
Obtain the information needed to use the BOSH CLI by doing the procedure in Gather Credential and IP Address Information.
SSH into your Ops Manager VM by doing the procedure in Log in to the Ops Manager VM with SSH for your IaaS.
Log in to your BOSH Director by doing the procedure in Log in to the BOSH Director.
Identify the VM to log in to with SSH by running the following command:
bosh -e MY-ENV -d MY-DEPLOYMENT vms
+ `MY-ENV` is the name of your environment. + `MY-DEPLOYMENT` is the name of your deployment.
Record the GUID associated with the
mysql-monitorVM, also known as the jumpbox VM.
SSH into your
mysql-monitorVM by running the following command:
bosh -e MY-ENV -d MY-DEP ssh mysql-monitor/GUID
+ `MY-ENV` is the name of your environment. + `MY-DEPLOYMENT` is the name of your deployment. + `GUID` is the GUID you recorded in the previous step.
View the status of your HA cluster by running the following command:
mysql-diag command returns the following message if your canary status is healthy:
Checking canary status...healthy
Here is a sample
mysql-diag output after the tool identified a healthy HA cluster:
mysql-diag command returns the following message if your canary status is unhealthy:
Checking canary status...unhealthy
In the event of a broken HA cluster, running
mysql-diag outputs actionable steps meant
to expedite the recovery of that HA cluster.
Below is a sample
mysql-diag output after the tool identified an unhealthy HA cluster: