Skip to content

Instantly share code, notes, and snippets.

@tmyers273
Created July 13, 2017 14:18
Show Gist options
  • Save tmyers273/d817155cf1411031d0fcb5e08499e2cc to your computer and use it in GitHub Desktop.
Save tmyers273/d817155cf1411031d0fcb5e08499e2cc to your computer and use it in GitHub Desktop.
DO Block Storage Setup
volume=
while [ -z $volume ]
do
echo -n 'Enter volume name: '
read volume
done
echo "Volume = $volume"
echo -e "Stopping mysql...\c"
systemctl stop mysql
echo "done"
echo -e "Moving existing database directory to new location...\c"
mv /var/lib/mysql /mnt/$volume/mysql
echo "done"
echo -e "Creating symlink...\c"
ln -s /mnt/$volume/mysql /var/lib/mysql
echo "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment