- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to shrink/ purge ibdata1 file in MySQL?
The ibdata1 file cannot shrink, it is a particularly troublesome feature of MySQL. The ibdata1 file can be shrinked if you delete all databases, remove the files and reload the mysqldump.
We can configure MySQL so that each table, including its indexes, is stored as a separate file. It is enabled by default as of version 5.6.6 of MySQL.
To setup our server to use separate files for each table, we need to change my.cnf in order to enable it.

If your MySQL version is below 5.6.6, then you need to add it in my.cnf file.
[mysqld] innodb_file_per_table = 1
Advertisements