Fix errors in case of multiple mysql installations.

This commit is contained in:
2024-01-17 01:40:49 +01:00
parent 62c2f65dbd
commit 845e9cf8ad
14 changed files with 976 additions and 345 deletions

View File

@@ -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++ ))