The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mysql in Home Partition?

Discussion in 'General Discussion' started by dkz, May 6, 2011.

  1. dkz

    dkz Well-Known Member

    Joined:
    Sep 10, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Hey everyone,
    I have a quick question. Is there any technical, performance or logical problem with placing the mysql databases in the /home partition? I am pretty sure it should be fine but I wanted to hear from the experts!

    Thank you.
     
  2. JeffP.

    JeffP. Well-Known Member

    Joined:
    Sep 28, 2010
    Messages:
    164
    Likes Received:
    9
    Trophy Points:
    18
    Hi dkz,

    It's really a matter of preference, but some folks prefer to store the databases on a separate partition. If you move them to /home, and if the /home partition becomes corrupt, then there could be issues not only with the users' accounts, but also with their dbs.

    Aside from that, changing the MySQL datadir is supported by MySQL, so there shouldn't be any technical issues.
     
  3. jdilegge

    jdilegge Member

    Joined:
    Dec 17, 2010
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Boston, Ma
    It is smarter to partition a second drive into 2 partitions and then put /var/lib/mysql into one and /home into the other.
     
  4. dkz

    dkz Well-Known Member

    Joined:
    Sep 10, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for the replies guys!

    I do like to have mysql on a separate partition but my /var partition is nearly full and reformatting is not an option.
     
  5. JerrySmith

    JerrySmith Active Member

    Joined:
    Apr 21, 2011
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    While it isn't recommended for various reasons, there is no technical limitation preventing you from storing MySQL databases in a directory other than /var/lib/mysql. There are no negative consequences within WHM/cPanel.

    Of course, it is preferable to provision an additional hard drive on your server to utilize for /var/lib/mysql. You can keep /var on the current drive and just create a new partition to mount as /var/lib/mysql.
     
Loading...

Share This Page