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!

/var/lib/mysql/ibdata1 too big

Discussion in 'Database Discussion' started by morteza, Jul 4, 2013.

  1. morteza

    morteza Member

    Joined:
    Dec 8, 2009
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    51
    Hi,

    This is a general question, I was wondering if any of you guys can help me with. /var/lib/mysql/ibdata1 grows up to 9GB and more, and this leaves no disk space on /var partition. Is it possible to move this file to another partition and make a link in /var/lib/mysql instead? Or do you know any solutions without altering /var size?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,888
    Likes Received:
    90
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, It's possible to change MySQL directory partition on your server using the following steps

    1) Stop the MySQL on your server

    2) Move your /var/lib/mysql directory to /home (other partition which have free space on your server)

    3) create the symbolic link of /var/lib/MySQL to your new MySQL directory location

    4) And start the MySQL on your server


    Thank you :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,183
    Likes Received:
    1,935
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Rather than symbolically linking that single file, you can move the MySQL data directory. You can find instructions for this on the following thread:

    Moving MySQL Data Directory

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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