diff --git a/cc-cleaner.sh b/cc-cleaner.sh index 028e868..ebe88d3 100755 --- a/cc-cleaner.sh +++ b/cc-cleaner.sh @@ -8,16 +8,16 @@ echo "" echo -e "${idsCL[LightGreen]}Cluster Control Removal Script${idsCL[Default]}" echo "" -cd ~ -rm -f ./install-cc -wget https://severalnines.com/downloads/cmon/install-cc -chmod +x ./install-cc -sed -i 's/\/var\/lib\/mysql\/mysql.sock/\/var\/run\/mysqld\/mysqld.sock/g' ./install-cc +# cd ~ +# rm -f ./install-cc +# wget https://severalnines.com/downloads/cmon/install-cc +# chmod +x ./install-cc +# sed -i 's/\/var\/lib\/mysql\/mysql.sock/\/var\/run\/mysqld\/mysqld.sock/g' ./install-cc read -n 1 -p "Are you sure you wish to remove Cluster Control and all data (Y/n)?" choice case "$choice" in -[Nn]) echo ''; ;; +[Nn]) echo '';; * ) echo '' apt remove --purge -y clustercontrol* @@ -51,13 +51,17 @@ case "$choice" in [Nn]) echo ''; exit 0;; * ) - ./install-cc + # ./install-cc + # + # #read -n 1 -p "Login at https://10.10.10.50 and setup the admin user, once complete then press ENTER" choice + # + # /opt/copycerts.sh + # apt install -y mailutils xtrabackup - #read -n 1 -p "Login at https://10.10.10.50 and setup the admin user, once complete then press ENTER" choice - - /opt/copycerts.sh - apt install -y mailutils xtrabackup - + read -p "Enter the admin password for MySQL: " pwd + echo "Enter the root password for adding back in the admin user for MySQL:" + mysql -u root -p -e "CREATE USER 'admin'@'%' IDENTIFIED BY '${pwd}';GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;" + ;; esac