LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   mysql ibdata1 is very large 95% drive in use - dropped tables but size ibdata remains (https://www.linuxquestions.org/questions/linux-server-73/mysql-ibdata1-is-very-large-95-drive-in-use-dropped-tables-but-size-ibdata-remains-712376/)

guest 03-17-2009 08:35 PM

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:
http://www.ubuntu-howto.info/howto/h...-or-hard-drive

But it still doesn't work :(

paulsm4 03-18-2009 01:46 PM

Hi -

Here's what you need to do:

http://forums.mysql.com/read.php?35,121880,121886

Quote:

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

guest 03-20-2009 12:53 PM

i'm trying to solve the 1st step.. the dump :)


All times are GMT -5. The time now is 01:16 AM.