From 09bda7f950ca65104daa1811b75a5503b211459d Mon Sep 17 00:00:00 2001 From: Christoph Date: Tue, 1 Sep 2020 14:38:28 +0200 Subject: [PATCH] Get rid of unused commented code lines. --- create_database.sh | 52 --------------------------------------- grant_dbaccess_to_user.sh | 52 --------------------------------------- 2 files changed, 104 deletions(-) diff --git a/create_database.sh b/create_database.sh index 7aad71f..e1a12c8 100755 --- a/create_database.sh +++ b/create_database.sh @@ -648,58 +648,6 @@ if [[ $? -ne 0 ]] ; then else echo_ok fi - -#if [[ "$MYSQL_CUR_DISTRIBUTION" = "MariaDB" ]] ; then -# -# echononl " Grant usage to user '$DATABASE_USER' (Creates User..)" -# mysql $MYSQL_CREDENTIAL_ARGS -N -s -e \ -# "GRANT USAGE ON *.* TO '$DATABASE_USER'@'localhost' IDENTIFIED BY '$DATABASE_PASSWD'" > $tmp_log_file 2>&1 -# if [[ $? -ne 0 ]] ; then -# echo_failed -# error "$(cat $tmp_log_file)" -# else -# echo_ok -# fi -# -# echononl " Grant all privileges to user '$DATABASE_USER' on Database '$DATABASE_NAME'" -# mysql $MYSQL_CREDENTIAL_ARGS -N -s -e \ -# "GRANT ALL PRIVILEGES ON ${DATABASE_NAME}.* TO '$DATABASE_USER'@'localhost'" > $tmp_log_file 2>&1 -# if [[ $? -ne 0 ]] ; then -# echo_failed -# error "$(cat $tmp_log_file)" -# else -# echo_ok -# fi -# -# if $ACCESS_FROM_OUTSIDE ; then -# -# for _ip in $IP_ADDRESSES ; do -# -# echononl " Grant usage to user '$DATABASE_USER' access from ${_ip}" -# mysql $MYSQL_CREDENTIAL_ARGS -N -s -e \ -# "GRANT USAGE ON *.* TO '$DATABASE_USER'@'${_ip}' IDENTIFIED BY '$DATABASE_PASSWD'" > $tmp_log_file 2>&1 -# if [[ $? -ne 0 ]] ; then -# echo_failed -# error "$(cat $tmp_log_file)" -# else -# echo_ok -# fi -# -# echononl " Grant all privileges to user '$DATABASE_USER' on Database '$DATABASE_NAME' from $_ip" -# mysql $MYSQL_CREDENTIAL_ARGS -N -s -e \ -# "GRANT ALL PRIVILEGES ON ${DATABASE_NAME}.* TO '$DATABASE_USER'@'${_ip}'" > $tmp_log_file 2>&1 -# if [[ $? -ne 0 ]] ; then -# echo_failed -# error "$(cat $tmp_log_file)" -# else -# echo_ok -# fi -# -# done -# -# fi -# -#elif [[ $MAJOR_VERSION -gt 8 ]] \ if [[ "$MYSQL_CUR_DISTRIBUTION" = "MySQL" ]] && ([[ $MAJOR_VERSION -gt 8 ]] \ || ( [[ $MAJOR_VERSION -eq 8 ]] && [[ $MINOR_VERSION -gt 0 ]] ) \ || ( [[ $MAJOR_VERSION -eq 8 ]] && [[ $MINOR_VERSION -eq 0 ]] && [[ $PATCH_LEVEL -ge 3 ]] )) ; then diff --git a/grant_dbaccess_to_user.sh b/grant_dbaccess_to_user.sh index 51ece21..892151d 100755 --- a/grant_dbaccess_to_user.sh +++ b/grant_dbaccess_to_user.sh @@ -639,58 +639,6 @@ else fi echo_ok - -#if [[ "$MYSQL_CUR_DISTRIBUTION" = "MariaDB" ]] ; then -# -# echononl " Grant usage to user '$DATABASE_USER' (Creates User..)" -# mysql $MYSQL_CREDENTIAL_ARGS -N -s -e \ -# "GRANT USAGE ON *.* TO '$DATABASE_USER'@'localhost' IDENTIFIED BY '$DATABASE_PASSWD'" > $tmp_log_file 2>&1 -# if [[ $? -ne 0 ]] ; then -# echo_failed -# error "$(cat $tmp_log_file)" -# else -# echo_ok -# fi -# -# echononl " Grant all privileges to user '$DATABASE_USER' on Database '$DATABASE_NAME'" -# mysql $MYSQL_CREDENTIAL_ARGS -N -s -e \ -# "GRANT ALL PRIVILEGES ON ${DATABASE_NAME}.* TO '$DATABASE_USER'@'localhost'" > $tmp_log_file 2>&1 -# if [[ $? -ne 0 ]] ; then -# echo_failed -# error "$(cat $tmp_log_file)" -# else -# echo_ok -# fi -# -# if $ACCESS_FROM_OUTSIDE ; then -# -# for _ip in $IP_ADDRESSES ; do -# -# echononl " Grant usage to user '$DATABASE_USER' access from ${_ip}" -# mysql $MYSQL_CREDENTIAL_ARGS -N -s -e \ -# "GRANT USAGE ON *.* TO '$DATABASE_USER'@'${_ip}' IDENTIFIED BY '$DATABASE_PASSWD'" > $tmp_log_file 2>&1 -# if [[ $? -ne 0 ]] ; then -# echo_failed -# error "$(cat $tmp_log_file)" -# else -# echo_ok -# fi -# -# echononl " Grant all privileges to user '$DATABASE_USER' on Database '$DATABASE_NAME' from $_ip" -# mysql $MYSQL_CREDENTIAL_ARGS -N -s -e \ -# "GRANT ALL PRIVILEGES ON ${DATABASE_NAME}.* TO '$DATABASE_USER'@'${_ip}'" > $tmp_log_file 2>&1 -# if [[ $? -ne 0 ]] ; then -# echo_failed -# error "$(cat $tmp_log_file)" -# else -# echo_ok -# fi -# -# done -# -# fi -# -#elif [[ $MAJOR_VERSION -gt 8 ]] \ if [[ "$MYSQL_CUR_DISTRIBUTION" = "MySQL" ]] && ([[ $MAJOR_VERSION -gt 8 ]] \ || ( [[ $MAJOR_VERSION -eq 8 ]] && [[ $MINOR_VERSION -gt 0 ]] ) \ || ( [[ $MAJOR_VERSION -eq 8 ]] && [[ $MINOR_VERSION -eq 0 ]] && [[ $PATCH_LEVEL -ge 3 ]] )) ; then