It is useful when running MySQL in container. Suppose that we have the following env variables:
MYSQL_USER='db_usr'
MYSQL_PASSWORD='db_pwd'
So, you can use the following as readiness/liveness probe:
/bin/sh -c -i "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping"