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.

ibdata1 innodb too large size

Discussion in 'Workarounds and Optimization' started by vplucky, Jan 27, 2012.

  1. vplucky

    vplucky Member

    Joined:
    Aug 24, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    The /var partition is almost full. On further explore, found that the database ibdata1 utilizing 4.9GB disk space.

    1. Please tell me the use of ibdata1 database
    2. Can I delete ibdata1 database?
    3. If I cannot delete, can I just move it to some other location?
    4. Can you let me know some commands to free up some space in /var partition?
     
  2. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
  3. hoststop

    hoststop Well-Known Member

    Joined:
    Dec 6, 2011
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Bolton, UK
    cPanel Access Level:
    Root Administrator
    As storminternet suggested, don't ever delete the ibdata file. An other alternative to free up some space is to stop mysql, move ibdata file to the partition which is large in size and create a symlink. Then start mysql on your server.

    Note :: See to it that mysql is stopped when you perform the activity.
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Also, do not perform this action to move ibdata1 to another location until you have created a backup of MySQL by a mysqldump as copying flat files for InnoDB engine tables can cause corruption. You really want to have an SQL-based backup before you do that type of action:

    Code:
    mysqldump --add-drop-table --all-databases | gzip > /home/alldatabases.sql.gz
     
  5. vplucky

    vplucky Member

    Joined:
    Aug 24, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Gosh,

    Never thought this db can be so important. Thanx all. Surely I will follow this steps and will update you. :)
     
Loading...

Share This Page