Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-17-2009, 09:35 PM   #1
Registered: May 2003
Distribution: CentOS 5 64 bit
Posts: 255

Rep: Reputation: 30
mysql ibdata1 is very large 95% drive in use - dropped tables but size ibdata remains

hey guys,

Is there a way to shrink the ibdata? It's about 75% of the drive and the drive is 95% in use. I tried dropping and recreating tables that take a huge chunk of the database but the size of the ibdata still remains the same. I'm using centos 5 64bit & mysql 5.0.45.

I have a slave drive and tried this:

But it still doesn't work

Last edited by guest; 03-17-2009 at 09:45 PM.
Old 03-18-2009, 02:46 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Here's what you need to do:,121880,121886

One solution to shrinking a shared InnoDB tablespace is:

1. Backup *all* InnoDB tables with mysqldump.

2. Drop all of the InnoDB tables.

3. Physically delete the ibdata1 file at the filesystem interface.

4. Restart MySQL Server, which recreates a new, small tablespace file.

5. Restore all your InnoDB tables, which expands the tablespace file as needed.
'Hope that helps .. PSM
Old 03-20-2009, 01:53 PM   #3
Registered: May 2003
Distribution: CentOS 5 64 bit
Posts: 255

Original Poster
Rep: Reputation: 30
i'm trying to solve the 1st step.. the dump


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql - Need to move ibdata1 file helpmhost Linux - Server 4 07-10-2008 10:30 PM
large interface tables patch alex_anagran Linux - Networking 0 11-08-2005 03:10 PM
large routing tables dunkyb Linux - Networking 10 04-26-2003 04:06 PM
Deleted the files, but the partition size remains CRego3D Linux - General 0 03-12-2003 02:02 AM
Large drive- too much space lost by large block size? tome Linux - General 5 12-14-2001 02:32 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:53 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration