Fix errors in case of multiple mysql installations.
This commit is contained in:
@@ -242,8 +242,17 @@ while [[ $index_arr -lt ${#mysql_credential_args_arr[@]} ]] ; do
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
error "$(cat $tmp_log_file)"
|
||||
if [[ "$(cat $tmp_log_file)" =~ "unknown variable 'login-path" ]] ; then
|
||||
if [[ -x "/usr/local/mysql/bin/mysql" ]] ; then
|
||||
/usr/local/mysql/bin/mysql $mysql_credential_args -N -s -e "FLUSH QUERY CACHE" > $tmp_log_file 2>&1
|
||||
if [[ $? -ne 0 ]] ; then
|
||||
echo_failed
|
||||
error "$(cat $tmp_log_file)"
|
||||
else
|
||||
echo_ok
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
(( index_arr++ ))
|
||||
|
||||
Reference in New Issue
Block a user