Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 740839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:33:46+00:00 2026-05-14T08:33:46+00:00

My ibdata1 file for MySQL database grew to about 32GB over time. Recently I

  • 0

My ibdata1 file for MySQL database grew to about 32GB over time. Recently I deleted about 10GB of data from my databases (and restarted mysql for good measure), but the file won’t shrink. Is there any way to reduce the size of this file

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:33:46+00:00Added an answer on May 14, 2026 at 8:33 am

    The file size of InnoDB tablespaces will never reduce automatically, no matter how much data you delete.

    What you could do, although it is a lot of effort, is to create one tablespace for every table by setting

    innodb_file_per_table
    

    The long part about this is, that you need to export ALL DATA from the mysql server (setting up a new server would be easier) and then reimport the data. Instead of one single ibdata1 file which holds the data for each and every table, you will find a lot of files called tablename.ibd which hold the data only for one single table.


    Afterwards:

    When you then delete a lot of data from tables, you can let mysql recreate the data-file by issuing

    alter table <tablename> engine=myisam;
    

    to switch to MyIsam (and have the InnoDB data file for this table deleted) and then

    alter table <tablename> engine=innodb;
    

    to recreate the table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to restore a database from an sql file through phpmyadmin import function.
I have about 12GB of data in my tables and my datafile, ibdata1, used
Is it possible to duplicate a MySQL database from their files? [I know mysqldump
I am working on a development copy of a MySQL / InnoDB database that
I have a MySQL server with binary logging active. Once a day logs file
The size of MySQL ibdata is 4GB, but I don't think the data I
Suppose a mysql 5.5 server uses the following configuration for storing innodb data innodb_data_file_path
I am just migrating from 5.1 to 5.5. I copy my data from mysql5.1
I have one MySQL table using the InnoDB storage engine; it contains about 2M
I have .frm, ibdata and ib_logfile from my previous version of MySQl and now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.