What is the ibdata1 file in my /var/lib/mysql directory?

James asked:

Logging in to my Webmin control panel, I noticed that virtually all of my disk space is full. I searched for the ten largest files/ directories on my system and found that a file called ibdata1 is taking up around 94GB of space. It resides in my /var/lib/mysql directory.

What does ibdata1 do? Am I safe to remove it? My assumption is that it’s a dump of some kind, but that’s just a wild guess.

My answer:


That file is ibdata1, not ibdatal and it contains all of your InnoDB databases. If you delete it, you lose all your data.

For some ideas on how to deal with it, see How to shrink/purge ibdata1 file in MySQL.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.