Last active
June 1, 2018 15:17
-
-
Save VirtuBox/48abce4bbef48ec6829e5fd7b701ac5c to your computer and use it in GitHub Desktop.
script to apply new innodb_log_file_size defined in /etc/mysql/my.cnf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "edit the variable innodb_log_file_size in /etc/mysql/my.cnf before launching this script" | |
echo "do you want to launch the script ? [y/n]" | |
read -r start | |
if [ "$start" = "n" ]; then | |
exit 1 | |
elif [[ "$start" = "y" ]]; then | |
service mysql stop | |
sleep 5 | |
mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak | |
mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak | |
service mysql start | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment