-
-
Save lrhache/12e5ae9f056d0200a1a7 to your computer and use it in GitHub Desktop.
Set MySQL to EBS storage
This file contains 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
sudo service mysql stop | |
sudo mkdir /ebs1/etc /ebs1/lib /ebs1/log | |
sudo mv /etc/mysql /ebs1/etc | |
sudo mv /var/lib/mysql /ebs1/lib | |
sudo mv /var/log/mysql /ebs1/log | |
sudo mkdir /etc/mysql /var/lib/mysql /var/log/mysql | |
echo "/ebs1/etc/mysql /etc/mysql none bind" | sudo tee -a /etc/fstab | |
sudo mount /etc/mysql | |
echo "/ebs1/lib/mysql /var/lib/mysql none bind" | sudo tee -a /etc/fstab | |
sudo mount /var/lib/mysql | |
echo "/ebs1/log/mysql /var/log/mysql none bind" | sudo tee -a /etc/fstab | |
sudo mount /var/log/mysql | |
sudo service mysql start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment