How to moving /var/lib/mysql

If you want to move the data which is stored in “/var” to another partition.


To move that path to another partition, run the following:



# cd /home
# mkdir mysql
# chown mysql:mysql mysql
# cd mysql
# /sbin/service mysqld stop
# cp -Rp /var/lib/mysql/* .
# cd /var/lib
# mv mysql mysql_old
# ln -s /home/mysql ./mysql
# /sbin/service mysqld start

Once satisfied that mysqld is running, remove the old data:


# rm -rf mysql_old

9 comments:

  • Kiley Thomaston

    Hey, i think you visited my website so i came to "return the favour".I am looking for ways to add things to my blog!I suppose its ok to use some of your ideas!!

  • Francisco Tovar

    Hey 573cd8, very interesting post, it really got me thinking. Thank you. cid1s

  • Hey latql kqaih, very interesting post, it really got me thinking. Thank you. 7ctnh 5gg66

  • Paraffin Pedicure

    Really valuable information here. Thank you for sharing your thoughts and explaining them so clearly. Two thumbs up!

  • alliance leveling guide

    Thanks for taking the time to share this, I feel strongly about it and love reading more on this topic. If possible, as you gain knowledge, would you mind updating your blog with more information? It is extremely helpful for me.

  • alliance leveling guide

    Your website arrived up in my search i am in awe of what you have published on this subject. I am presently extending my investigation and thus can't contribute further, notwithstanding, I've bookmarked your web site and you'll be returning to keep up with any approaching revisions. Simply love it and thank you for tolerating my comment.

  • Rapidshare Search

    First of all I care for the quality of your post. That was interesting to read and helpful article. And Im lookin' forward to see your next thinks.

  • Jonathan Nunez

    Great blog. You will find several opinions on this topic and this blog states the problem very great.

  • Post a Comment