Skip to content

Instantly share code, notes, and snippets.

@VirtuBox
Last active June 1, 2018 15:17
Show Gist options
  • Save VirtuBox/48abce4bbef48ec6829e5fd7b701ac5c to your computer and use it in GitHub Desktop.
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
#!/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