Created
July 28, 2013 12:37
-
-
Save ninadsp/6098434 to your computer and use it in GitHub Desktop.
Code snippets for my blogpost on moving MySQL's data directory (http://ninad.pundaliks.in/blog/2011/11/mysql-moving-datadir/ )
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 |
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 rsync -av /var/lib/mysql /mnt/data/mysql |
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 vim /etc/mysql/my.cnf | |
datadir=/mnt/data/mysql |
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 /etc/init.d/apparmor reload |
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 start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment