Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Mysql Storage Questions

Discussion in 'General Discussion' started by digitalinsights, May 27, 2007.

  1. digitalinsights

    Oct 8, 2006
    Likes Received:
    Trophy Points:
    Hello Guys.... Hope we're all doing well. Well here's my coffee cup question for hte morning.

    It seems that my mysql databases are storing in the

    /var/lib/mysql folder rather then in some off sub diretory of the user partitions in the /home.

    Is there a way I can get the mysql database to actually store the datbase in the /home folder...

    My problem is my /var partition is 10gigs and thats fine... but some of my users are creating large databases that need to be stored on the much larger user parition of /home which is 350 gig... So that would be outstanding....

    Any suggestions on how to move them over....
  2. jsnape

    jsnape Well-Known Member

    Mar 11, 2002
    Likes Received:
    Trophy Points:
    Symlink? But pretty sure that doesn't work well if at all with mysql.

    maybe -
    If there is a backup drive put the files into home temporarily, partition the backup drive adding a second partition, name that /var2 in fstab - create a directory /var2 mount the partition copy the files from /var :

    shut off mysql & make it so it wont start back up with chkservd

    cd /
    cp -br var/* var2

    fix the names, unmount /var rename /var2 in fstab

    start mysql and watch the error log

    (untested commands BTW)

    I've had the same problem but it was already time to upgrade the whole box with a fresh install and larger partions. I did a temp fix by getting other things out of that partition whichj bought me a few months.

    du -s -B 1024K /var/* |sort -n

    and symlink the larger folders (other than /var/lib)
    #2 jsnape, May 27, 2007
    Last edited: May 27, 2007

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice