-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for mysql 5.6+ login paths #11
Comments
sample code to add support for --login-path parameter as an alternative to --user and --password parameters, and to add some logic to check for conflicting parameter(s): Usage: ./check_mysql_slavestatus.sh (-o file|(-H dbhost [-P port]|-S socket) (-u dbuser -p dbpass|-l loginpath)) [-s connection] [-w integer] [-c integer] [-m integer]######################################################################### Check whether all required arguments were passed in (either option file or full connection settings)if [[ -z "${optfile}" && -z "${host}" && -z "${socket}" && -z "${loginpath}" ]]; then Connect to the DB server and store output in varsif [[ -n $loginpath ]]; then |
Thank you very much for making this available. I have a small improvement request. Could support for the --login-path parameter for the mysql client be added to this script ?
For example if a new "-l" switch was added the affected lines of code might be something like these (plus relevant documentation changes):
...
while getopts "H:P:u:p:S:s:w:c:o:m:h:l" Input;
...
l) loginpath="--login-path=${OPTARG}";;
...
then for the case we receive the -l switch the invoke of the mysql client would be
ConnectionResult=$(mysql ${loginpath} ${optfile} ... -e "show slave ${connection} status\G" 2>&1)
...
Thank you again for considering this
The text was updated successfully, but these errors were encountered: